[Ffmpeg-devel] Encoding multichannel audio with ffmpeg

Baptiste Coudurier baptiste.coudurier
Wed Nov 8 10:40:34 CET 2006


Hi

Allan Sandfeld Jensen wrote:
> On Monday 06 November 2006 21:39, Michael Niedermayer wrote:
>> Hi
>>
>> On Mon, Nov 06, 2006 at 09:34:26PM +0100, Alessandro Grassi wrote:
>>> Hi, this is my first request to ffmpeg-devel. I hope you can help me.
>>> I want to encode multichannel audio with ffmpeg.
>>> I found that in ffmpeg.c at line 2968 encoding of formats other than AC3
>>> and DTS is limited to stereo.
>>> If I try to allow 5.1 encoding in AAC or WAV format the channel order in
>>> encoded files is wrong. For example, when decoding AC3 to WAV the channel
>>> order of the AC3 is preserved in the WAV, while it requires a different
>>> order.
>>> I found on the web that the right channel order forsome formats is this:
>>> AC3: LFE L C R SL SR
>>> WAV: L R C LFE SL SR
>>> AAC: C L R SL SR LFE
> This btw. is way too simplified. All of these formats can have many more 
> channels than that.
> 
>>> To properly encode multichannel audio ffmpeg would need something to
>>> correctly reorder channels depending on input and output formats.
>>> I don't know how to do that. Does someone?
>> write a audio filter layer for ffmpeg :)
>>
>> you could of course hack ffmpeg.c too but that is not so ideal as it
>> would quickly become quite messy
>>
> But it would be nice if ffmpeg had a concept of channel ordering, otherwise it 
> the filter would need to know the details of all decoders in ffmpeg.
> 

Well, like AVChannelOrder, containing useful infos. Feel free to imagine
something.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list