我試圖爲gstreamer發出一個命令,以便它可以同時播放多個視頻文件。所以我做了一些研究,發現這一個試圖在Gstreamer中同時播放多個視頻文件
gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink \
videotestsrc pattern=1 ! video/x-raw-yuv, framerate=5/1, width=320, height=180 ! \
videobox border-alpha=0 top=0 left=0 ! mix. \
videotestsrc pattern=15 ! video/x-raw-yuv, framerate=5/1, width=320, height=180 ! \
videobox border-alpha=0 top=0 left=-320 ! mix. \
videotestsrc pattern=13 ! video/x-raw-yuv, framerate=5/1, width=320, height=180 ! \
videobox border-alpha=0 top=-180 left=0 ! mix. \
videotestsrc pattern=0 ! video/x-raw-yuv, framerate=5/1, width=320, height=180 ! \
videobox border-alpha=0 top=-180 left=-320 ! mix. \
videotestsrc pattern=3 ! video/x-raw-yuv, framerate=5/1, width=640, height=360 ! mix.
這是輸出圖像= http://i.stack.imgur.com/4lZWL.png
,這裏是我修改的假設是這樣的
http://i.stack.imgur.com/Mdsc0.png
time gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink \
filesrc location=./Cityscape1Min_720p_mp4.mp4 ! video/x-raw-yuv, framerate=5/1, \
width=320, height=180 ! videobox border-alpha=0 top=0 left=0 ! mix. \
filesrc location=./Cityscape1Min_720p_mp4.mp4 ! video/x-raw-yuv, framerate=5/1, \
width=320, height=180 ! videobox border-alpha=0 top=0 left=-320 ! mix. \
filesrc location=./Cityscape1Min_720p_mp4.mp4 ! video/x-raw-yuv, framerate=5/1, \
width=320, height=180 ! videobox border-alpha=0 top=-180 left=0 ! mix. \
filesrc location=./Cityscape1Min_720p_mp4.mp4 ! video/x-raw-yuv, framerate=5/1, \
width=320, height=180 ! videobox border-alpha=0 top=-180 left=-320 ! mix.
代碼
但它不起作用。任何人有其他解決方案
猜你需要解碼你的視頻文件。嘗試插入'decodebin2!每個'videobox'元素前的videorate!'。 –
還是不行。錯誤說Stream不包含數據 –
'Stream不包含數據'?您確定您可以使用沒有視頻混合器的管道自行播放文件嗎? –