简体   繁体   English

gstreamer mux导致错误的管道

[英]gstreamer mux causing erroneous pipeline

I am building a pipeline where I need to mux multiple videos(2 in this case) into a muxer(multistreamscimux). 我正在建立一个管道,在这里我需要将多个视频(在这种情况下为2个)多路复用到一个多路复用器(multistreamscimux)中。 When I build the pipeline it throws errorneous pipeline: unexpected reference. 当我构建管道时,它会抛出错误的管道:意外的引用。

The following png is generated out of the pipeline that muxes a single video. 从合并单个视频的管道中生成以下png。 I am trying to create a pipe starting from rtpbin that goes into multistreamrtpscimux.rtpsrc_2. 我试图创建一个从rtpbin开始的管道,该管道进入multistreamrtpscimux.rtpsrc_2。 But I think I may be making a mistake in the way I specify the mux source and sink pads. 但是我认为在指定多路复用器源和接收器焊盘的方式上可能会犯一个错误。 I have tried the ones mentioned in here but could not resolve it. 我已经尝试过这里提到的方法,但是无法解决。 Any help is appreciated. 任何帮助表示赞赏。

在此处输入图片说明

Here is the actual pipeline that I am trying to build. 这是我尝试构建的实际管道。

gst-launch-1.0 -v rtpbin name=rtpbin_0  videotestsrc pattern=ball is-live=true 
name=vidsource_0 ! video/x-raw, framerate=30/1, width=180, height=90 ! textoverlay
 text="" valignment=4 ! x264enc aud=false name=videoenc_0 ! video/x-h264,
profile=baseline, stream-format=byte-stream,alignment=au ! rtph264pay mtu=1256 
pt=109  ! multistreamrtpmux name=multirtpmux_0 csis-string="22446601" 
vid-headerext-id=1 vid-header-extension-string="04" frame-marking-headerext-id=2 
frame-marking-header-extension-string="48" ! msrtpscimux.rtpsink_0 
 multistreamrtpscimux name=msrtpscimux ! rtpbin name=rtpbin_1  videotestsrc pattern=ball
 is-live=true name=vidsource_1 ! video/x-raw, framerate=30/1, width=180, height=90
 ! textoverlay text="" valignment=4 ! x264enc aud=false name=videoenc_1 !
video/x-h264, profile=baseline, stream-format=byte-stream,alignment=au ! 
rtph264pay mtu=1256 pt=109  ! multistreamrtpmux name=multirtpmux_1 
csis-string="22446601" vid-headerext-id=1 vid-header-extension-string="04" 
frame-marking-headerext-id=2 frame-marking-header-extension-string="48" !
multirtpmux_1.rtpsrc msrtpscimux.rtpsink_1 msrtpscimux. msrtpscimux.rtpsrc ! 
netsim drop-probability=0.0 delay-probability=0.0 ! 
application/x-rtp ! rtpbin_0.send_rtp_sink_0 rtpbin_0.send_rtp_src_0 !
multisocketudpsink name=videosink rtpbin_0.send_rtcp_src_0 !  
multisocketudpsink name=rtcpsink sync=false async=false

I was able to fix this issue by specifying the sinkpads of the mux element I want to connect to in each of the substream and then finally specify the mux element with its parameters. 通过在每个子流中指定要连接的mux元素的水槽垫,然后最终通过其参数指定mux元素,我能够解决此问题。 a brief example as below.. for connecting 下面是一个简短的示例..用于连接

[videotestsrc]->[multirtpmux]--[sinkpad_0             ]
                               |     msrtpscimux      |
[videotestsrc]->[multirtpmux]--[sinkpad_1             ]

For the above I used 对于以上我使用

videotestsrc pattern=ball ! multistreamrtpmux name=multirtpmux_0 ! \
msrtpscimux.rtpsink_0 videotestsrc pattern=red ! \
 multistreamrtpmux name=multirtpmux_1 ! msrtpscimux.rtpsink_3 \
multistreamrtpscimux name=msrtpscimux

Note: I dont use pipe between msrtpscimux.rtpsink_3 multistreamrtpscimux name=msrtpscimux to indicate that I am using a different substream 注意:我不在msrtpscimux.rtpsink_3 multistreamrtpscimux name = msrtpscimux之间使用管道来表示我正在使用其他子流

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM