From: Aman Gupta <>

This patchset improves the overall network performance of the hls
demuxer when streaming from an HTTP/1.1 server, using two new
options: http_persistent and http_multiple.

Here is a very unscientific benchmark showing the throughput and fps
increases achieved by both options (individually and together). In
this case I was downloading 150 2s segments from another computer
over my local network. Throughput gains over the internet would be
considerably more dramatic as higher latencies are involved (and
https is often used, adding tls negotiation overhead as well).

$ ./ffmpeg -http_persistent 0 -http_multiple 0 \
           -i ""; -c copy -f null /dev/null
frame=17967 fps=1221 time=00:04:59.99 speed=20.4x

$ ./ffmpeg -http_persistent 0 -http_multiple 1 \
           -i ""; -c copy -f null /dev/null
frame=17967 fps=1282 time=00:04:59.99 speed=21.4x

$ ./ffmpeg -http_persistent 1 -http_multiple 0 \
           -i ""; -c copy -f null /dev/null
frame=17967 fps=1727 time=00:04:59.99 speed=28.8x

$ ./ffmpeg -http_persistent 1 -http_multiple 1 \
           -i ""; -c copy -f null /dev/null
frame=17967 fps=1864 time=00:04:59.99 speed=31.1x

Aman Gupta (5):
  avformat/http: ff_http_do_new_request() returns EINVAL if re-used with
    different hostname
  avformat/http: add "Opening" info logging to ff_http_do_new_request
  avformat/hls: add http_persistent option
  avformat/hls: allow open_input to be re-used
  avformat/hls: add http_multiple option

 doc/demuxers.texi  |   6 +++
 libavformat/hls.c  | 131 +++++++++++++++++++++++++++++++++++++++++++++++------
 libavformat/http.c |  17 +++++++
 3 files changed, 141 insertions(+), 13 deletions(-)

2.14.3 (Apple Git-98)

ffmpeg-devel mailing list

Reply via email to