[Ffmpeg-devel] Encoding multichannel audio with ffmpeg
Allan Sandfeld Jensen
Wed Nov 8 10:43:04 CET 2006
On Monday 06 November 2006 21:39, Michael Niedermayer wrote:
> 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.
More information about the ffmpeg-devel