Francois M.
Francois M.

Reputation: 31

Decode and stream h264 over udp with GStreamer

I'm trying to decode a video from h264 and reencode it to transfer to a client trhough udp:

On the transmitter side:

gst-launch-1.0 -v filesrc location=/home/ubuntu/Videos/test.mp4 ! qtdemux name=demux ! h264parse ! omxh264dec ! nvvidconv ! omxh264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

On the receiver side:

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink

I do it locally, for a test, on an NVidia Tegra TK1, but nothing is being displayed although no error is being raised.

Does anybody see something to add? Thanks in advance.

Upvotes: 2

Views: 7550

Answers (1)

Francois M.
Francois M.

Reputation: 31

Ok, I finally made it work, but using an other network protocol:

Just for testing, send and receive locally on the Tegra TK1 itself:

Send:

gst-launch-1.0 filesrc location=/home/ubuntu/Videos/test.mp4 ! qtdemux name=demux ! h264parse ! omxh264dec ! nvvidconv ! omxh264enc ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=127.0.0.1 port=5000 

Receive:

gst-launch-1.0 -v tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink sync=false

Result is choppy, but I don't care at this stage. I receive something!!

Receive on Ubuntu PC:

gst-launch-1.0 -v tcpclientsrc host=<Tegra IP> port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

Upvotes: 1

Related Questions