Reputation: 751
I am trying to create a simple UDP video stream with Gstreamer1.0. The problem is that for the purpose of my project I need to be able to have a vanilla UDP stream but almost all the tutorials I was able to find have RTP enabled. So I would like to translate this simple stream:
Player:
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
Server:
gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! x264enc ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=5000
Can someone point me in the right direction on how to translate this simple example in UDP only?
Upvotes: 1
Views: 1716
Reputation: 1285
The pipeline you stated above, at the sender's side I do not see any use of rtp
. Ideally rtpjpegpay
should have been used at the sender's side, which is then depayed at the receiver using rtpjpegdepay
.
Have you tried the same pipelines, without UDP. It would complain you that the packet size at udpsink
is more than the buffer. You will need rtpxpay
to fragment the video stream into rtp packets.
In case you do not need rtp, try sending the stream directly but with a limit on the buffer size at the udpsink
. This can also result in increased delay in rendering video, some packets getting lost, etc. Try experimenting with different values for the buffer sizes/packet size on udpsink
. Unfortunately udpsink
does not provide direct control on configuring these sizes. So you may have to find out other ways.
Upvotes: 1