使用GStreamer解码并在udp上传输h264

时间:2015-03-20 16:18:47

标签: gstreamer h.264 tegra

我正在尝试解码来自h264的视频并重新编码以转移到客户端,即使是udp:

在发射器方面:

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

在接收方:

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

我在NVidia Tegra TK1上本地进行测试,但没有显示任何错误,但没有出现错误。

有人看到要添加的内容吗?提前谢谢。

1 个答案:

答案 0 :(得分:1)

好的,我终于让它工作了,但是使用了其他网络协议:

仅用于Tegra TK1本身的测试,发送和接收:

发送:

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 

接收:

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

结果不稳定,但我不在乎这个阶段。我收到了一些东西!!

在Ubuntu PC上接收:

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