1

I recently found how to download 'HLS' from a site and that works.

But one thing I could not find is if a particular site has available video in more than one resolution, say 1280x720 and 1920x1080.

How can I tell 'FFMPEG' to download 1280x720 and not 1920x1080?

This is the code I tried:

ffmpeg -i "https://hsprepack.akamaized.net/videos/hotstarint/world/kwks6/1_2/master.m3u8?hdnea=st=1540184067~exp=1540185867~acl=/*~hmac=a8945f016b594e1e2e4192ee05e2feaa5811c687d1891f69be1acc9057dd725f" -c copy output.mp4

1 Answer 1

1

When you access a HLS master playlist using FFmpeg, all the variants are presented as numbered programs. You need to map the desired program.

So, first run

ffmpeg -i hls-link

to identify the program.

Then run,

ffmpeg -i hls-link -map 0:p:2 -c copy out

to download Program 2.

2
  • thank you very much it worked i had the idea it had something to do with -map but i was lacking knowledge of p that stand for program which ring the bell when i saw the logs
    – C.J.
    Commented Oct 23, 2018 at 5:11
  • How can I download all three resolutions... Besides running this command three times? Ideally I'd like to do them all in one command, so I assume I need multiple MAP params ?
    – Joe
    Commented Jul 6, 2022 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .