Playing an RTSP Stream via GStreamer-Backend

At the end of the GStreamer crash course article, it briefly mentions that

If your stream uses rtsp then instead of filesrc you will use rtspsource, which ends up looking like:

"rtspsrc location=[address]”

Let's take a look to see what this might look like using the publicly available RTSP stream test here:

https://www.wowza.com/developer/rtsp-stream-test

As we can see the direct RTSP URL of this file is

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

So that means

rtspsrc location=[address]

becomes

rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

And then you would have to plug in the rest of your pipeline options relative to your hardware and stream.

For example this could look like:

rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 latency=300 ! queue ! rtph264depay ! h264parse ! 
avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480  ! appsink name=video-sink;use_external

Note: This pipeline is meant to be used with an External Render Extension. Which is why we see the appsink and use_external flags

Of course, chances are good that your pipeline will be different depending on what is available on your hardware.

 

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post