我希望接收一个rtmp流并创建一个以v4l2sink作为输出的管道。
gst-launch rtmpsrc location="rtmp://localhost/live/test" ! "video/x-raw-yuv,width=640,height=480,framerate=30/1,format=(fourcc)YUY2" ! videorate ! v4l2sink device=/dev/video1但是我只有一个绿色的屏幕:https://www.dropbox.com/s/yq9oqi9m62c5afo/screencast1422465570.webm?dl=0
发布于 2015-01-29 18:32:16
现在它起作用了:
gst-launch rtmpsrc location="rtmp://localhost/live/test" ! decodebin2 ! videoscale ! ffmpegcolorspace ! videorate ! "video/x-raw-yuv,width=1920,height=1080,framerate=30/1,format=(fourcc)YUY2" ! v4l2sink device=/dev/video1发布于 2015-01-29 14:22:32
您的管道正在告诉GStreamer将编码、屏蔽的RTMP数据作为YUV视频缓冲区处理。
相反,您需要解析、解码和解码RTMP数据的视频部分。我没有要测试的示例流,但您可能只需要使用解码(在GStreamer 0.10中,无论出于什么原因,它被称为decodebin2 )。您还需要将视频重排序到框架上限之前,这样它就知道要转换到什么了。
在黑暗中狂野刺伤:
gst-launch rtmpsrc location="rtmp://localhost/live/test" ! decodebin2 ! videoscale ! ffmpegcolorspace ! videorate ! "video/x-raw-yuv,width=640,height=480,framerate=30/1,format=(fourcc)YUY2" ! v4l2sink device=/dev/video1https://stackoverflow.com/questions/28198503
复制相似问题