how to merge audio using ffmpeg, not concat

6

2

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 ?

coding_idiot

Posted 2013-09-13T08:36:06.050

Reputation: 281

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 – 2013-09-13T18:18:32.160

@LordNeckbeard found the solution thanks http://www.ffmpeg.org/ffmpeg-filters.html#amix

– coding_idiot – 2013-09-14T02:38:53.053

Answers

10

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.

coding_idiot

Posted 2013-09-13T08:36:06.050

Reputation: 281

I don't need a transition. How do I skip that? – chovy – 2017-03-21T00:44:14.007

@chovy have you tried 0 for dropout_transition ? – coding_idiot – 2017-03-21T19:41:59.183