I have an mxf file from a canon camcorder. It contains 1 video stream and 2 audio streams corresponding to left and right channel. My video editor (an old version of premiere) cannot read this file, so I have to demux it into video and audio files. I have no problem with the video and first audio stream.
I also read that you can put stream specifier on the option, so i tried
ffmpeg -i input.mxf -codec:a:2 copy out2.wav
This doesn't work. I get the first audio stream. What am I misunderstanding?
I'm trying to understand ffmpeg better because I have more advance operations in mind (e.g. re-package the mxf file into a file that premiere cs4 can read).
MXF files are great because of the wealth of information that they can pack in to the metadata to describe the essence it carries however as a result there are a myriad of different ways of carrying audio in MXF files which will impact what is the appropriate mapping for you to output to extract the files you need.
I would recommend that you post the information you get from the source file by just running the -i command and pasting the results here for us to take a full look at.
The -map option is usually enough to allocate the mapping of your output into files, streams and channels (in that order).
tip - A regular gotcha for anybody dealing with numbers in this output is to remember that the first item whether it is a file, stream or channel will start from '0'