[FFmpeg-devel] HLS Segmenter and the "hls_time" option
Steven Liu
lingjiujianke at gmail.com
Fri Aug 26 03:05:31 EEST 2016
2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian <barhom at netsat.se>:
> Hello,
>
> I've been thinking about an option for "hls_time" that is not currently
> supported by FFMpeg and I would like feedback to if some of you may think
> this is useful or utterly unnecessary.
>
> I find scenarios where we sometimes want to create an HLS output and would
> like the *first couple of segments* to be shorter than the *rest of the
> segments.*
>
> For example starting off with 1s segments up to N segments then switch to
> 5s segments.
>
> The reasoning is simply to have the playlist.m3u8 and first segment
> available *asap.*
>
> What do you think? Do you know how this can be achieved?
>
> Thanks,
>
ffmpeg split segment use hlsenc by keyframe, if you want to split segment
*ASAP*,
you can try set your streaming *GOP(Group Of Picture)* shorter,
for example: gop_size = 60, c->time_base = (AVRational){1,60};
in command line : -r:v 60 -g 60
if can accept split segment at non-keyframe, you can use hls_time and
hls_flags split_by_time.
More information about the ffmpeg-devel
mailing list