Search code examples
udpgstreamerh.264rtp

Gstreamer. Sending multiple files via rtp


I built a pipeline that reads one file and sends it via rtp

gst-launch-1.0 filesrc location="00001.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

What does a pipeline look like that reads several files at the same time, set ssrc to them and also sends via rtp?

UPD I try to use:

gst-launch-1.0 filesrc location="/home/ml/00002.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! "application/x-rtp, ssrc=(uint)1111111" ! queue name=qsink ! udpsink host=127.0.0.1 port=5000 filesrc location="/home/ml/00001.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! "application/x-rtp, ssrc=(uint)1111112" ! qsink

but get error: WARNING: erroneous pipeline: no element "qsink"

How can i merge two streams?


Solution

  • At the end i built working pipeline: funnel name=f ! udpsink host=0.0.0.0 port=5000 filesrc location="/var/tmp/video_folder/00003.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! application/x-rtp, ssrc=(uint)100000, payload=(int)96 ! f.sink_0 filesrc location="/var/tmp/video_folder/00002.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! application/x-rtp, ssrc=(uint)100001, payload=(int)97 ! f.sink_1 filesrc location="/var/tmp/video_folder/00001.mp4" ! qtdemux ! h264parse ! avdec_h264 ! x264enc ! rtph264pay ! application/x-rtp, ssrc=(uint)100002, payload=(int)98 ! f.sink_2