3

I've been trying to merge two audio tracks together. I want the shorter audio "track.mp3" to come first, then the longer audio Wizkid should come immediately after the track.mp3

Here is my code:

ffmpeg -i track.mp3 -i Wizkid.mp3 -filter_complex concat=n=1:v=0:a=1 fin.mp3

The code did merge both audio files, but it created an 11 second audio file. The track.mp3 is less than 5 seconds while the Wizkid.mp3 is about 04:11 long.

Any solution to merge both audio files with both audio lengths merged together?

Xeos
  • 5,975
  • 11
  • 50
  • 79
Gift101
  • 33
  • 1
  • 4

1 Answers1

2

This should work for you:

ffmpeg -i "concat:file1.mp3|file2.mp3" -i file2.mp3 -acodec copy test.mp3 -map_metadata 0:1

I just did it and it appears to do what you are asking for.