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

Glau Stuff glau.stuff at ridiculousprods.com
Tue Aug 16 21:01:32 CEST 2011


On 8/16/11 10:46 AM, "James Lu" <luj125 at gmail.com> wrote:

>On Tue, Aug 16, 2011 at 1:39 PM, Glau Stuff
><glau.stuff at ridiculousprods.com>wrote:
>
>>
>><SNIP>
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>Hey Glau,
>
>I don't believe ffmpeg has the capability to map to channels. AFAIK, -map
>only maps different streams. I expect that when libavfilter gets audio
>filters that this will be among its most basic features.
>
>Open programs I suggest to do what you are looking for:
>Sox: http://sox.sourceforge.net/
>Similar to ffmpeg in command line complexity
>Audacity: http://audacity.sourceforge.net/
>GUI audio manipulation tool
>
>Hope this helps,
>~James

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.

ffmpeg (using the commands I'm familiar with) will only convert the first
"Track" it sees and ignores any secondary tracks.

Here's the output from a sample file just using "ffmpeg -i sample.mov".
I've omitted the non-relevant output.

> ffmpeg -i sample.mov

<snip>

libpostproc   51. 2. 0 / 51. 2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x80ea850]multiple edit list entries, a/v
desync might occur, patch welcome
    Last message repeated 1 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mov':
  Metadata:
	major_brand     : qt
	minor_version   : 537199360
	compatible_brands: qt
	title-eng       : Decator #1 2010-06-02 at 10.02
	title           : Decator #1 2010-06-02 at 10.02
  Duration: 00:09:26.65, start: 0.000000, bitrate: 94 kb/s
	Stream #0.0(eng): Audio: aac, 44100 Hz, mono, s16, 31 kb/s
	Stream #0.1(eng): Audio: aac, 44100 Hz, mono, s16, 31 kb/s
At least one output file must be specified
>


As you can see from the output, ffmpeg has found two "Tracks":  Stream
#0.0 and #0.1

When using our chain listed above, we end up with a MP3 that only contains
the audio for Stream #0.0

Right now we're having to download this edge case files and convert them
on the desktop and reupload them to the server. Not a super great
solution... :(




More information about the ffmpeg-user mailing list