0

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.

coder_uk
  • 657
  • 1
  • 8
  • 20

1 Answers1

0

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.

Stoney Eagle
  • 982
  • 8
  • 11
  • That's right, however if the input is an .m3u8, is FFMPEG smart enough to parse that, figure out e.g. the segment at 2 hours, and so only download that particular segment to extract the frame? (I would assume an ABR .m3u8 could not be used as input as it wouldn't know which sub m3u8 to pick from within that) – coder_uk Sep 22 '20 at 00:17
  • 1
    @coder_uk Yes Ffmpeg parses the m3u8 file to know which files are needed. – Stoney Eagle Sep 22 '20 at 15:35
  • Ah ... neat. Thanks. – coder_uk Sep 22 '20 at 18:51