Log in

View Full Version : ffmpeg: audio tracks


Klagar
13th October 2010, 20:20
Hi !

We have a .vob file that we need to encode ; problem is, when we pass it through FFmpeg, it encodes the audio tracks on which are the director's comments ; we'd like to have the "normal" audio. Is there any way to select a particular audio track in FFmpeg ?

J_Darnley
13th October 2010, 20:38
RTFM and post in the right section.

-map

Klagar
13th October 2010, 20:57
Sorry I hadn't seen there was an Audio Encoding section. I'm used to coming here for anything related to FFmpeg.
And sorry if the x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) is not very exhaustive on the subject of audio and neither are the official FFmpeg documentation (http://www.ffmpeg.org/ffmpeg-doc.html) or the mencoder manual :
-map file:stream[:syncfile:syncstream] set input stream mapping
Maybe I don't know how to read between the lines, but that doesn't tell me much.

J_Darnley
13th October 2010, 21:09
Since I don't have your file and I can't see the output from ffmpeg, I can't tell you want to do. I can only tell you that you select the tracks based on the number of the stream that ffmpeg prints. ffmpeg counts files starting at zero. Video is usually the 0 stream with audio following as 1, 2... So to do the same as ffmpeg would for one standard 1 video 1 audio file you would use: -map 0.0 -map 0.1

Klagar
13th October 2010, 21:16
Thanks a lot, I had found a source of information which was pretty unclear, but you made it clear for me ! :)

Blue_MiSfit
13th October 2010, 22:50
Moving this thread to Audio Encoding

beandog
14th October 2010, 22:13
Hi !

We have a .vob file that we need to encode ; problem is, when we pass it through FFmpeg, it encodes the audio tracks on which are the director's comments ; we'd like to have the "normal" audio. Is there any way to select a particular audio track in FFmpeg ?

If anyone else is curious, what ffmpeg does on some DVD VOBs is it will return the audio stream index in reverse order.

Where normally they'd be 0x80, 0x81, 0x82 where the first is English, the second is Spanish, and the third is the commentary (for example), on some sources, it will be ordered backwards.

When using ffmpeg, it'll always select the first audio track by default if you don't specify which one you use.

Klagar
15th October 2010, 13:51
Mmmmmmm thanks for the clue !
It may help understand ; we haven't had this problem so far because we mostly deal with movies which have a single audio track ; I think it's the first time we even get one that has commentaries. But I'll follow your example if it can keep us from having similar problems in the future :)