使用此管道,我可以使用视频混合器播放两个相同的视频,但是当我播放两个不同的视频时,它会失败。
gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink \
uridecodebin uri="file:///home/dtolj/projects/test1.mp4" ! decodebin2 ! videorate ! videoscale ! video/x-raw-yuv,width=320,height=180 ! videobox border-alpha=0 top=0 left=0 ! mix. \
uridecodebin uri="file:///home/dtolj/projects/test2.mp4" ! decodebin2 ! videorate ! videoscale ! video/x-raw-yuv,width=320,height=180 ! videobox border-alpha=0 top=0 left=-320 ! mix.
错误:
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin1/GstDecodeBin2:decodebin22/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(3865): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin1/GstDecodeBin2:decodebin22/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
答案 0 :(得分:1)
似乎我正在解码视频两次,我删除了decodebin2
,gstreamer似乎对视频格式非常挑剔。也许我不应该过多地依赖uridecodebin
并尝试使用适当的分路器。