Reputation: 944
I am accessing a RTSP
video stream from a VIRB 360 camera. I am able to play the stream using the following gstreamer
command:
gst-launch-1.0 -v playbin uri=rtsp://192.168.0.1/livePreviewStream?maxResolutionVertical=720\&liveStreamActive=1
However, there is a 3 second delay in the streaming, which needs to be eliminated. The output of the above command (due to -v
) has been uploaded here. I also created a few .svg
files for the pipeline following the method described in this question/ answer. Those files has been uploaded here. I believe mypipeline4.svg
and mypipeline5.svg
represent the complete pipeline (Multiple dot
files were generated by a single pipeline and that's reason for multiple .svg
file). In the .svg
files, can see a latency=2000
under rtpjitterbuffer
.
The plan is to build the same pipeline by adding components manually instead of using playbin
, and then set latency property for rtpjitterbuffer
. I have tried the following commands:
1) gst-launch-1.0 rtspsrc location=rtsp://192.168.0.1/livePreviewStream?maxResolutionVertical=720\&liveStreamActive=1 ! udpsrc ! rtpsession ! rtpssrcdemux ! rtpjitterbuffer ! rtpptdemux ! queue ! udpsink ! queue ! rtph264depay ! h264parse ! omxh264dec ! playsink
2) gst-launch-1.0 rtspsrc location=rtsp://192.168.0.1/livePreviewStream?maxResolutionVertical=720\&liveStreamActive=1 ! udpsrc ! rtpsession ! rtpssrcdemux ! rtpjitterbuffer ! rtpptdemux ! queue ! udpsink ! queue ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink
However, in both cases, I received an error: WARNING: erroneous pipeline: could not link udpsink0 to queue1.
How can I fix this? Also, from my experiments I pretty sure that the rest of the pipeline also has errors. How can I optimize this pipeline?
Upvotes: 3
Views: 14340
Reputation: 61
First, you are not supposed to connect anything to a sink in GStreamer. The sink is the end of the line and should just receive data. Especially the udpsink is to send UDP packets to the network. See more at documentation:
https://gstreamer.freedesktop.org/documentation/udp/udpsink.html?gi-language=c
I am also trying to reduce my latency, and the best that I got until now is:
gst-launch-1.0 rtspsrc location=rtsp://10.20.0.188:554 latency=0 buffer-mode=auto ! decodebin ! vaapisink sync=false
I'm getting 400ms delay through it while in the camera app I have 150ms, I wanna to reduce it.
I hope this helps you ;)
Upvotes: 5