[FFmpeg-user] How to always select last (audio) stream with "-map"?

Benjamin Peng human.peng at gmail.com
Tue Sep 22 05:38:16 EEST 2020

When I download from a HLS master m3u8 using `ffmpeg`, due to the way
automatic stream selection works, it always defaults to the first audio
track, which typically has the lowest bitrate. (Video stream doesn't have
this problem because it automatically chooses the highest resolution.)

I have to manually select the last audio track/stream with `-map 0:X`,
however I didn't find a way to always choose the last audio track,
regardless how many I have.



More information about the ffmpeg-user mailing list