[FFmpeg-user] Low latency H.264 streaming with ffmpeg

Roger Pack rogerdpack2 at gmail.com
Tue Jan 12 19:30:09 CET 2016

On 1/12/16, Greger Burman <gb at moroco.se> wrote:
> I would like to hear from anyone who has experience with low latency video
> streaming and ffmpeg.
> In my application I take video from a PCIe capture device and stream live
> over network. The end to end latency must be below 200ms otherwise it is
> not usable. Let us assume that the network latency is near zero. This
> question is about encoder+decoder+buffering latency.
> Very low latency can be achieved when using the x264 encoder by using
> settings like tune zerolatency. From my own testing with x264 (without
> ffmpeg) I can confirm that this works. I have measured approx 90 ms (3
> frames) of latency added by encoder+decoder combined. Awesome.
> Sadly I have been unable to get anywhere near those numbers when using
> ffmpeg and libx264. As player I use either ffplay or a dot-net player built
> on the ffmpeg libraries, with about equal results. The lowest end to end
> latency I have seen is 400-500ms. That includes capture latency also.

mplayer -benchmark has been the only client I've found with reasonable
latency, though I'm sure there are others/more.
I've gotten pretty low latency before with ultrafast+zerolatency

Basically my advice is "be wary of ffplay (and vlc)" I'm not sure if
its latency is low enough...


More information about the ffmpeg-user mailing list