Choose download resolution in m3u8 list with ffmpeg
16,559
Solution 1
You have to use the -map
option.
ffmpeg ... -i "https://sitevideo.com/list.m3u8" -map p:1 -c copy "/home/file/video.ts"
p:1
refers to the 2nd program (variant playlist, in this case)..
Solution 2
If you don't put the map command it will take the best quality by default.
Author by
Bruno Andrade
Updated on July 13, 2022Comments
-
Bruno Andrade almost 2 years
I'm trying to download video from a m3u8 playlist using ffmpeg but I do not know how to choose the resolution to download. Currently the command is downloading the highest version
the command I am using is:
/home/user/bin/ffmpeg -user_agent "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" -i "https://sitevideo.com/list.m3u8" -c copy "/home/file/video.ts"
My list is this
#EXTM3U #EXT-X-VERSION:3 #EXT-X-STREAM-INF:BANDWIDTH=400000,NAME="low" size1.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=800000,NAME="med" size2.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=1900000,NAME="best" size3.m3u8