ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

Complex filter with multiple maps

Open eriknikulski opened this issue 4 years ago • 1 comments

I am mixing a video with audio and have this command that I am trying use with this library:

ffmpeg -i video.mp4 -i music.mp3 -filter_complex amix -map 0:v -map 0:a -map 1:a -shortest -c:v copy output.mp4

But I can't seem to get it work, mainly because of the multiple maps. What would be the preferred syntax?

eriknikulski avatar Apr 11 '21 11:04 eriknikulski

I think to use amix you can do this

aout = ffmpeg.filter(
    [
        in0.audio,
        in1.audio,
    ],
    "amix",
)

chapmanjacobd avatar Apr 17 '22 03:04 chapmanjacobd