[FFmpeg-devel] [PATCH] af_mix: mix two audio streams
nicolas.george at normalesup.org
Sun Apr 1 12:26:42 CEST 2012
Le tridi 13 germinal, an CCXX, Clément Bœsch a écrit :
> Adding the levels, it begins to look a bit insane IMO.
That is a bit exaggerated, but I grant you it is somewhat overly verbose.
> Maybe the "mix" filter could be added in the "pan" one, so it could use
> the internals?
Possibly. Another, IMHO cleaner solution, would be to tweak the parser to be
able to write:
and it would automatically fill the matrix as if the coefficients have been
given as "stereo:c0=0.4*c0+0.6*c2:c1=0.4*c1+0.6*c3".
A kind of macro-expansion, in fact (but IMHO, simpler written avoiding text
> (A pan cmd line could be generated in the mix init func and use amerge
I am not sure what you mean, but it looks fragile and ad-hoc.
Ad-hoc is my main problem with this patch: Matthieu wrote it for the case he
needs to solve, but it stops working on most other case. For example mixing
a mono commentary on a stereo music will not work.
Adding a special case for a very common need is ok, of course, but I do not
believe that mixing with the same channel layout is that much more common
than mixing with different layouts, or mixing from more than two streams.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel