hi i am a new member of this site after looking at this site for hours i found how to download 'HLS' from a site and it works also. but one thing i could not find is if a particular site has available video in more than one resolution say 1280*720 and 1920*1080. so how do i tell 'FFMPEG' to download 1280*720 and not 1920*1080. 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


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.

  • 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. Oct 23 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.