[FFmpeg-devel] [PATCH] make HLS support unequal duration in VOD playlist

Somsak Sriprayoonsakul somsaks at gmail.com
Fri Apr 20 07:17:49 EEST 2018


This patch make ffmpeg able to create a single HLS m3u8 with different
duration in the same manifest for VOD playlist ype.

This has benefit on optimizing HLS stream to start faster, having
initially shorter duration. The later part of the
stream could have longer duration, which lower server load (less number
of files, less
connection initiation needed on server side which is very significant in
this HTTPS era).

The similar capability was already exists in ffmpeg hlsenc.c, but only
for
live playlist. I just fix it a little bit to make it support VOD
playlist..

To create such VOD stream

ffmpeg -i input -c:v libx264 -c:a aac \
  -hls_init_time 2 -hls_time 8 \
  -hls_list_size 5 -hls_playlist_type vod \
  -f hls output_vod.m3u8

VOD playlist will use hls_list_size as the intended number of chunk to
use the hls_init_time.



More information about the ffmpeg-devel mailing list