How to play udpsrc using VLC

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to play udpsrc using VLC

Raya
Hello,

I want to play an UPD video using VLC on my smartphone, I tried this syntax udp://@:5000 but it does not work.
Do you know what is the right syntax ?

I am using the following gstreamer pipeline.

gst-launch-1.0 -v  v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! x264enc ! h264parse ! rtph264pay ! udpsink host=CLIENT_IP port=5000

I appreciate your help.
Reply | Threaded
Open this post in threaded view
|

Re: How to play udpsrc using VLC

Arjen Veenhuizen
You have to tell the receiving end what it is actually receiving. Normally, one would use an SDP file for that. As a quick hack you can try to stream in an mp2ts container. VLC has better luck figuring that out (without SDP) than h264 but the rate of success greatly depends on the exact version of VLC.

 gst-launch-1.0 -v  v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! x264enc ! h264parse ! mpegtsmux ! rtpmp2tpay ! udpsink host=CLIENT_IP port=5000


Note that when you would have used GStreamer at the client side, you also would have needed to communicate the output caps  of the sender (application/x-rtp,...) to the receiving end.