流到v4l2loopback设备的ecklink不可靠

问题描述

gst-launch-1.0 version 1.14.5,GStreamer 1.14.5,blackmagic,11.2a8,

目标
我必须打开Blackmagic decklink捕获并将其流式传输到v4l2loopback设备,以电子方式使用WebRTC公开打开它。我的管道设置在我早期的开发工作中一直可靠地工作。事情已经改变,我无法再可靠地打开管道。我对gst调试没有经验,所以可以提供任何帮助。

详细信息 我一直在使用的管道如下所示:

gst-launch-1.0 -v decklinkvideosrc mode=15 connection=hdmi video-format=1 ! \
video/x-raw,format=UYVY,width=1920 ! \
videoconvert ! \
v4l2sink device=/dev/video7

这是该管道中的stdout / stderr:

Pipeline is live and does not need preroll ...
/GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0: hw-serial-number =
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0.GstPad:src: caps = video/x-raw,width=(int)1920,height=(int)1080,pixel-aspect-ratio=(fraction)1/1,interlace-mode=(string)progressive,framerate=(fraction)60000/1001,format=(string)UYVY,colorimetry=(string)bt709,chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw,chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw,colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0.GstPad:sink: caps = video/x-raw,colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw,chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw,chroma-site=(string)mpeg2
ERROR: from element /GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0:
streaming stopped,reason error (-5)
Execution ended after 0:00:00.097652127
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

我插入了带有video_nr = 7的v4l2loopback模块,并且视频设备的确出现在/dev中。

更多信息

我知道源代码有效,因为我可以按如下方式打开“预览”:

gst-launch-1.0 -v decklinkvideosrc mode=15 connection=hdmi video-format=1 ! \
video/x-raw,width=1920 ! \
videoconvert ! \
ximagesink

stderr / stdout:

Setting pipeline to PAUSED ...
Pipeline is live and does not need preroll ...
/GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0: hw-serial-number = 
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstDecklinkVideoSrc:decklinkvideosrc0.GstPad:src: caps = video/x-raw,format=(string)BGRx
/GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps = video/x-raw,format=(string)BGRx
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw,chroma-site=(string)mpeg2

此外

使用其他来源测试流产生的行为大致相同:

$ gst-launch-1.0 -v videotestsrc pattern=sNow ! video/x-raw,width=1280,height=720 ! v4l2sink device=/dev/video7

Setting pipeline to PAUSED ...
Pipeline is prerollING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw,format=(string)YUY2,width=(int)1280,height=(int)720,framerate=(fraction)30/1,multiview-mode=(string)mono,colorimetry=(string)2:4:7:1,pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw,pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0.GstPad:sink: caps = video/x-raw,pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw,pixel-aspect-ratio=(fraction)1/1
Pipeline is prerollED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped,reason error (-5)
Execution ended after 0:00:00.033580044
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)