Gstreamer:如何将mp4视频输出到/ dev / video0?

时间:2019-07-07 17:34:28

标签: gstreamer

我发现.avi文件是这样的

  

gst-launch-1.0 -v filesrc location = test.avi! avidemux!解码器!   视频转换! “ video / x-raw,format = YUY2”! v4l2sink device = / dev / video0

然后将这一个输出屏幕插入/ dev / video0:

  

gst-launch-1.0 -v ximagesrc startx = 1 starty = 1 endx = 320 endy = 240!   视频转换! “ video / x-raw,format = YUY2”! v4l2sink device = / dev / video0

关于如何使用Gstreamer 输入.mp4文件而不是.avi文件的任何想法?

1 个答案:

答案 0 :(得分:1)

  

gst-launch-1.0 -v filesrc location = test.mp4! qtdemux!解码器!视频转换! “ video / x-raw,format = YUY2”! v4l2sink device = / dev / video0

由于MP4文件没有固定帧速率的概念,因此必须添加视频速率元素并设置所需的帧速率(可能取决于输出设备)。

  

gst-launch-1.0 -v filesrc location = test.mp4! qtdemux!解码器!视频率!视频转换! “ video / x-raw,format = YUY2,framerate = 30/1”! v4l2sink device = / dev / video0