The latency problem of Streaming h264 video through TCP

Jiaqi Gao gaojiaqi0 at gmail.com
Wed Oct 25 21:05:15 UTC 2017


Hi,

I'm trying to stream H264 video through TCP, and here is my pipeline:

Sender:
gst-launch-1.0 playbin uri=file:///[video-path] video-sink="x264enc
tune=zetolatency ! tcpclientsink port=9999 host=localhost"

Receiver:
gst-launch-1.0 tcpserversrc port=9999 host=localhost ! h264parse !
avdec_h264 ! videoconvert ! avenc_bmp ! multifilesink location=[path]

The reason I have to use playbin is I want the sender to act like a camera
and output video at specific frame rate (such as 5fps).

The whole pipeline works fine, but the problem is h264parse doesn't output
one frame until it receives the information of next frame. This means if I
have a 5fps video, the latency is at least 1/5=200ms. I don't have this
problem when I'm streaming through UDP.

Does anyone has any idea to reduce the latency and let h264parse output the
frame as long as it receives the whole frame?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171025/83baa24d/attachment.html>


More information about the gstreamer-devel mailing list