[FFmpeg-devel] Channel mapping in libavfilter
stefasab at gmail.com
Wed Jan 11 13:32:47 CET 2012
On date Wednesday 2012-01-11 13:17:55 +0100, Clément Bœsch encoded:
> -map_channel was recently introduced in ffmpeg (only this program), using a
> libswresample feature integrated at the same time. Now the issue is, this option
> is supposed to be able to pick channels from different streams, but due to
> ffmpeg design it is not possible (one output stream is only associated with one
> input stream). To workaround this issue, we can use amerge audio filter (to
> merge streams), but this is not that easy to use.
> The second patch (first one is just an almost not related patch) introduce the
> channel remapping feature in libavfilter, so the -map_channel feature could
> actually create a filtergraph transparently, using amerge and channelremap audio
> filters. This should result in a simpler ffmpeg.c, a more complete libavfilter
> so it could be used elsewhere, and more importantly the ability for -map_channel
> to pick channels from different streams (and thus remove the unfamous
> Note that this will require a hard dependency in lavfi to libswr. There is
> already a dependency to libswscale so I guess it won't hurt to have the same for
> the audio.
That's not a problem, it is still possible to link libavfilter without
libswscale, same will be with libswsresample, even if this limits the
functionality of the compiled library.
> Also, I believe libswr could help simplifying and remove a lot
> duplicated code in af_aconvert, af_aformat and af_aresample (and maybe extend
> the current lavfi support and performances).
Definitively, and would allow to remove the dependency on lavc at the
FFmpeg = Fancy Free Mythic Portentous Enhancing Gadget
More information about the ffmpeg-devel