[FFmpeg-devel] [RFC] amerge design issue

Stefano Sabatini stefasab at gmail.com
Sat Sep 1 01:13:52 CEST 2012


this command (and the corresponding -filter_complex):

ffmpeg -f lavfi -i "aevalsrc=sin(2*PI*400*t) [l] ; aevalsrc=sin(2*PI*800*t) [r] ; [l] anull [l1]; [r] anull [r1]; [l1] [r1] amerge" -f null -

fails with:
[Parsed_amerge_4 @ 0x2e2f6b0] No channel layout for input 1
aevalsrc=sin(2*PI*400*t) [l] ; aevalsrc=sin(2*PI*800*t) [r] ; [l] anull [l1]; [r] anull [r1]; [l1] [r1] amerge: Invalid argument

On the other hand the command:
ffmpeg -f lavfi -i "aevalsrc=sin(2*PI*400*t) [l] ; aevalsrc=sin(2*PI*800*t) [r] ; [l] [r] amerge" -f null

will work fine.

The problem is that amerge check the input channel layouts in
query_formats(), which is executed *before* link configurations, so
anull (or any other filter which don't set the channel layout during
the init stage), will fail with amerge.

Still couldn't think about a valid solution.
FFmpeg = Fundamental and Furious Most Puritan Excellent Guru

More information about the ffmpeg-devel mailing list