[FFmpeg-user] converting Quicktime files with multiple audio tracks.

James Lu luj125 at gmail.com
Tue Aug 16 21:22:14 CEST 2011

> SOX doesn't seem to handle MOV files as a source input. Error Message:

> sox FAIL formats: no handler for file extension `mov'
> We had been getting around this problem with the exception of the
> multi-track issue by using the following chain on the command line. (only
> command line options are usable as this is part of a server solution)
> * ffmpeg -i original.mov temp.wav                       (This converts our
> source file to
> generic WAV)
> * sox 'temp.wav' 'sox_temp.wav' highpass -2 150         (roll off some bass
> on
> all files)
> * ffmpeg -y -i 'sox_temp.wav' -vn -acodec libmpelame -ac 2 -ar 22050 -ab
> 80Kk 'final.mp3' (make the final MP3)
> Since ffmpeg recognizes and can open more formats than sox, specifically
> MOV and AAC files, we use that as the first step to create a generic WAV.
> From there we manipulate the WAV in sox and finally create our final low
> bandwidth MP3. This works fine except with the multi-track issues.
> <snip>

Hm, I think you can extract 2 different streams as 2 different files.
* ffmpeg -i original.mov -map 0:1 -vn -ac 1 temp1.wav
* ffmpeg -i original.mov -map 0:2 -vn -ac 1 temp2.wav
* sox -m 'temp1.wav' 'temp2.wav' -c 2 'sox_temp.wav' highpass -2 15
* ffmpeg -y -i 'sox_temp.wav' -vn -acodec libmpelame -ac 2 -ar 22050 -ab
80Kk 'final.mp3'

Never used sox before, so no guarantee this works at all haha, maybe I'll
get lucky?
Basically what I changed is that instead of keeping the 2 streams in one
file, I mapped the streams and then mixed them in sox using -m (-M *should*
produce something different but I don't know how different in this case).

Hope this helps,

More information about the ffmpeg-user mailing list