Link two gstreamer rtspsrcs

Hello everyone! I have two ip-devices (camera for video stream and coder for audio stream). I want to connect two streams and in the end receive file (and stream it to rtspclientsink in future). How can I do it? I used to try a lot of combinations of gst-elements (yes, I checked pads, they match). Camera and coder are defenitely in working condition. Please help me ^_^
Here is one of pipelines I’ve tried:
gst-launch-1.0 -e rtspsrc location=‘<camera_ip>’ name=src
src. ! rtph264depay ! h264parse ! avdec_h264 ! queue ! mux.
rtspsrc location=‘<coder_ip>’ ! rtpssrcdemux name=dmx
dmx.audio_0_01e2 ! aacparse ! mux.
matroskamux name=mux ! filesink location=video.mp4
and errors I’ve got:
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 1
Progress: (open) Opened Stream
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Redistribute latency…
Redistribute latency…
0:00:02.880824886 27077 0x7f70008770 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error.
0:00:02.880894939 27077 0x7f70008770 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason not-linked (-1)
0:00:02.882575644 27077 0x7f70008720 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error.
0:00:02.882608613 27077 0x7f70008720 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason not-linked (-1)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc1/GstUDPSrc:udpsrc5: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc1/GstUDPSrc:udpsrc5:
streaming stopped, reason not-linked (-1)
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…

Hi,
We suggest break down the pipeline to audio and video only and check if both video and audio sources are good first:

gst-launch-1.0 -e rtspsrc location=‘<camera_ip>’ name=src src. ! rtph264depay ! h264parse ! avdec_h264 ! queue ! mux. matroskamux name=mux ! filesink location=video.mp4

gst-launch-1.0 -e rtspsrc location=‘<coder_ip>’ ! rtpssrcdemux name=dmx dmx.audio_0_01e2 ! aacparse ! mux. matroskamux name=mux ! filesink location=audio.mp4

Hi! both of pipelines you gave do not work, but this one do : gst-launch-1.0 -e rtspsrc location='<cam or coder ip>' ! rtph264depay ! h264parse ! avdec_h264 ! queue ! mux. matroskamux name=mux ! filesink location=only_video.mkv
Unfortunately, it give me only video stream. Btw, I use jetson nano. Is there any workable pipeline for sound?

Hi,
Looks like audio source cannot be received and decoded. Suggest you work out a working pipeline for audio decoding first. And then combine the audio and video pipelines.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.