sigur7
sigur7

Reputation: 936

Merge two MP3 files and maintain high bitrate and original properties of MP3s

I have two MP3 files that were created from the same source, with different audio within them. Here are the properties from ffprobe

Duration: 00:00:08.86, bitrate: 384 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, 1 channels, s16, 384 kb/s

NOTE: Even though the file is an MP3 it shows as pcm_s16le

When I try and join the two files together using ffmpeg -i download.mp3 -i download1.mp3 -filter_complex [0:a:0][1:a:0]concat=n=2:v=0:a=1[outa] -map [outa] joineddownloads.mp3

I get the following result and a big drop in bitrate(quality)

Duration: 00:00:10.42, start: 0.046042, bitrate: 32 kb/s
    Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s

How can I maintain the high 320kbs bitrate and all the other properties that were present before I created the joined file?

Upvotes: 1

Views: 736

Answers (1)

Markus Schumann
Markus Schumann

Reputation: 8244

To avoid re-encoding - concatenate the two mp3s

First create a text file ‘files.txt’ containing two lines:

file '/path/download.mp3'

file '/path/download1.mp3'

Second:

ffmpeg -f concat -i files.txt -c copy out.mp3

Upvotes: 0

Related Questions