简体   繁体   中英

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). 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. I am trying to create a pipe starting from rtpbin that goes into 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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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