Using rtspsrc with decodebin

Hello,

I’m trying to play audio/video from an rtsp source by constructing pipeline with gst_parse_launch(). I’m using decodebin; however, the video playback gets stuck if the rtspsrc does not have an audio stream. How can this be solved (automatically detetect and play audio if available)?

My pipeline

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=500 protocols=4 ! decodebin name=decodebin decodebin. ! queue ! videoconvert ! autovideosink name=autovideosink decodebin. ! queue ! audioconvert ! autoaudiosink name=autoaudiosink

Thank you

This is not an answer to your question, though if you just intend to play, the easiest way would be using playbin:

gst-launch-1.0 playbin uri=rtsp://127.0.0.1:8554/test uridecodebin0::source::latency=0 

You cannot use a gst_parse_launch string with audio if there is no audio. You would need to write an application and handle that case manually.

Or if playback is required, using playbin/3 can handle playback of such scenarios.

1 Like