Using a HLS m3u8 or DASH mpd as ffmpeg input: seeking performance

1.1k views Asked by At

I wonder if any FFMPEG wizards can help with this:

I've seen examples (like FFmpeg code not working on http url for thumbnail extraction) of using a http URL as the input but so far only with an .mp4.

If I were to instead use an ABR .m3u8/.mpd as the input (which, though a text file, does represent a video) ... is FFMPEG smart enough to work with it? To parse it? So ... if I gave it a 5 hour HLS VOD m3u8 as input (-i http...), and asked it for a frame at 4 hours in (-ss), would it only download that one 10s segment at the 4-hours point? And so only need to download a small 10 second .ts file. Or does it download the whole thing?

Thanks.

1

There are 1 answers

3
Stoney Eagle On

If you place the -ss HH:MM:SS flag before the input Ffmpeg will start from there, if you place the seek flag after the input Ffmpeg will start at the beginning of the video.
Take a look at Seeking.