Help with gst-rtsp-server displaying OpenCV data from UDP source

Shishigami me at marcelherd.com
Thu Oct 24 11:37:55 UTC 2019


I have built a simple RTSP server with gst-rtsp-server using the following
pipeline: 

udpsrc port=8553 ! application/x-rtp, payload=96 ! rtpjitterbuffer !
rtph264depay ! avdec_h264 ! x264enc tune=zerolatency ! rtph264pay name=pay0
pt=96

I have verified its functionality successfully by feeding it videotestsrc
from command line and displaying it in VLC:

gst-launch-1.0 -v videotestsrc !
video/x-raw,width=800,height=600,codec=h264,type=video ! videoscale !
videoconvert ! x264enc tune=zerolatency ! rtph264pay ! udpsink
host=127.0.0.1 port=8553

Instead of videotestsrc, I'd like to use video from an Intel RealSense
camera which is processed with OpenCV. I have compiled OpenCV with Gstreamer
support. I use VideoWriter with appsrc:

VideoWriter out("appsrc ! videoconvert ! x264enc tune=zerolatency !
rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8553", CAP_GSTREAMER, 0, 30,
Size(640, 480), true);
out.write(foreground); // foreground is a Mat3b

Unfortunately when I open the stream in VLC, it fails: 

VLC is unable to open the MRL 'rtsp://127.0.0.1:8554/realsense'

If I show foreground using imshow, it shows the desired result.

I have set GST_DEBUG to 3 and get the following output:
https://gist.github.com/marcelherd/7b0f70d40b91da9725db2bd92ef64f1a

I'm really not sure what I'm doing wrong, I'd appreciate any help.

The full code (based on example code) is available here:
https://gist.github.com/marcelherd/67be9734ec018626b7d7b2d9c42b86a8



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list