ffmpeg copy highest quality audio track of a specific language Say you input has 2 english audio tracks, 7.1 and 2.0. 

You want to copy the audio track of highest quality (number of channels) to audio.ext 

If I use -map 0:m:language:eng it selects all english audio tracks where I thought by default it would only copy the highest channel audio track.

Example:

ffmpeg -i *mkv -map 0:m:language:eng -vn -acodec copy output.flac
A map option will select all streams matched by the specification. The 'best' stream is only selected in the absence of any map options.

So, you'll need a two-stage process to do this:

ffmpeg -i in.mkv -map 0:a:m:language:eng -vn -acodec copy -f nut - | ffmpeg -f nut -i - -c copy output.flac


The first ffmpeg process sends all English language audio streams to the 2nd ffmpeg process, which will select only the 'best' among the received streams for output.

If you want to keep metadata, and not worry about the codec of the input file, you can change your output to .mkv