[Libav-user] http streaming latency depends on frame rate
x.morion.x at gmail.com
Wed Jun 6 08:57:29 CEST 2012
Good day to all.
I'm using libav in my application to encode live video to h264, mux it
in Live Smooth Streaming format and send to IIS Live Smooth Streaming
publishing point (via http).
I need to achieve quite low latency (<3 seconds) of live video. When
the video is recorded on regular frame rate (20-30 fps), everything is
good and latency is even lower. But when I try lower fps values, the
latency grows. For 5 fps the latency is 5-6 seconds, for 2 fps it is
11 seconds and for 1 fps - 21 second.
I've measured time of the encoding of each frame, it is approximately
1.5 seconds and didn't changed with fps. Also disabled all buffering
at the video player side to exclude it. So the problem seems to be
somewhere at http transfer process (that is performed by libav too).
First I thought that some kind of buffer is used in libav for http
transfer, and on the lower frame rate it is filled slower, and that's
the reason of increased latency. But changing video resolution and
bitrate doesn't affect on latency, though obviously should change
encoded frame size and so change the buffer filling rate.
Now I'm completely out of ideas what is reason of that latency and how
to remove it. Does anyone have any suggestions?
Thanks in advance,
More information about the Libav-user