Specifying a track to extract by metadata

Questions involving a Windows version of FFmpeg.
Post Reply
PieCaptain
Posts: 8
Joined: Thu Oct 13, 2016 9:46 am

Specifying a track to extract by metadata

Post by PieCaptain » Tue Oct 18, 2016 12:44 pm

as an extension to my question in viewtopic.php?f=7&t=4749

Could someone point me in the right direction for specifying tracks using other metadata?

ultimately i want to only extract english audio with 5.1 surround.

I can select english audio using

Code: Select all

-map 0:m:language:eng
as advised in the documentation, but i cannot work out how to filter by surround sound.

I've tried

Code: Select all

-map "0:m:channels:5.1(side)"
-map 0:m:channels:5.1(side)
-map 0:m:channels:5.1
-map 0:m:channels:6

-map "0:m:channel:5.1(side)"
-map 0:m:channel:5.1(side)
-map 0:m:channel:5.1
-map 0:m:channel:6
to no avail, can anyone point me in the right direction?

Thanks again

Paul

llogan
Posts: 332
Joined: Fri Mar 14, 2014 3:29 am

Re: Specifying a track to extract by metadata

Post by llogan » Tue Oct 25, 2016 7:37 pm

I doubt your input has any "channel" metadata (one reason why you should always include your actual command and the complete console output from your command).

You may have to script this by using ffprobe to determine stream index, language, and channels/channel_layout.

Code: Select all

ffprobe -v error -show_entries stream=index,channels,channel_layout:stream_tags=language -of default=nw=1 input

Post Reply
'