[FFmpeg-user] m3u8 seeking accuracy

Louis Letourneau lletourn49 at gmail.com
Mon Nov 28 17:42:08 EET 2016


>
> It's missing feature iirc, if this is static file you could create
> index once and use it for precise seeking after.
>

Didn't quite get that.
Are you saying to re-encode  using 'single_file' to use EXT-X-BYTERANGE
elements in the m3u8?

I tried and it does seem to work
mkdir a;ffmpeg -y -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero
-vf "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeMono.ttf:
text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1:
boxcolor=0x000000FF" -an -vcodec libx264 -preset medium -tune stillimage
-crf 24 -pix_fmt yuv420p -shortest -force_key_frames
"expr:gte(t,n_forced*5)" -bf 0 -hls_time 5 -hls_list_size 0 -hls_wrap 0
-hls_allow_cache 1 -hls_flags single_file -t 120 a.m3u8

I'll need to see how well supported the #EXT-X-VERSION:4 with BYTERANGE
support is in browsers and such. also if it works with live content...but I
think this could be an issue.

In anycase I don't see why it couldn't work with constant framerate
multi-file m3u8.
I do understand if it's a missing feature though.

Louis


More information about the ffmpeg-user mailing list