16

I want audio files to be merged and be the length of the longest one of course.

Not to concat them, which means adding one behind the other.

I tried googling since yesterday night, but didn't found any such thing. Is this really possible ?

2
  • Yes, it is probably possible, but to give you an example I'd like to see the complete output of ffmpeg -i input1 -i input2 -i input3.
    – llogan
    Sep 13, 2013 at 18:18
  • @LordNeckbeard found the solution thanks ffmpeg.org/ffmpeg-filters.html#amix Sep 14, 2013 at 2:38

1 Answer 1

24

For helping others, I'm posting the solution I found :

http://www.ffmpeg.org/ffmpeg-filters.html#amix

Mixes multiple audio inputs into a single output.

For example

ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT

Above command will mix 3 input audio streams to a single output with the same duration as the first input and a dropout transition time of 3 seconds.

3
  • I don't need a transition. How do I skip that?
    – chovy
    Mar 21, 2017 at 0:44
  • @chovy have you tried 0 for dropout_transition ? Mar 21, 2017 at 19:41
  • I suppose you can just remove :dropout_transition=3 Jun 16, 2022 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .