[FFmpeg-devel] [PATCH] avfilter/af_amerge: add reorder_inputs option to be able to turn off reordering

Nicolas George george at nsup.org
Mon Sep 5 17:43:02 EEST 2016


Le decadi 20 fructidor, an CCXXIV, Marton Balint a écrit :
> The order of the channels to remain unchanged regardless of the input
> channel layout (which is often guessed only). Filtering in ffmpeg is
> unfortunately forcing you to use channel layouts, even if you don't want to,
> even if you only want to say: this track has 2 channels, that stream track
> has 1 channels. Don't assume anything else.

I feel Carl Eugen has the right of it.

libavfilter can work with streams with unknown layouts, but some individual
filters may not. To make them work is relatively easy. First, make sure they
do not use the channel layout: most filters from the fork will use the
channel layout to know the number of channels, we have a separated field for
that. Then declare accordingly the list of formats in query formats.

The real problem is ffmpeg.c: it will try to guess the channel layout when
none is specified. I think I added an option to avoid that, but it may have
been lost at some point.

And of course, most of the time, there is a channel layout, you just have to
make sure it is properly set at input and let the logic do its work.

> Another example: You have a file, with mono tracks. Some tracks have correct
> metadata describing the channel layout of the files, others don't.
                                                       ^^^^^^^^^^^^
This is what needs fixing.

>								     You wan't
> the channels in file-order, regardless of the correctness of the input
> channel layout metadata in the file.

Not true. Codecs work with the channel layouts, for inter-channel
correlation, for the cutoff frequency on the subwoofer, etc.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160905/8025c2b9/attachment.sig>


More information about the ffmpeg-devel mailing list