When I calculate the duration of each individual file I want to concatenate I get 10.24 for both. So I figured when I concatenate the two files I would get a duration of file A plus file B or 10.24 + 10.24 giving me a total duration of 20.48 for the combined file. But no matter what command I use to concentrate I cannot get the same duration. Am I doing something wrong?
ffprobe -i "audioA.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24
ffprobe -i "audioB.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24
Which makes a total of 10.24 + 10.24 = 20.48 seconds
But when I concatenate the files I get a different duration. Here are my different tries.
Try 1
FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' -map 0:a -codec:a copy -map_metadata -1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.610612
Try 2
FFMPEG -y -i audioA.mp3 -i audioB.mp3 -filter_complex [0:a][1:a]concat=n=2:v=0:a=1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0
20.453878
Try 3
FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.506122
- Is there a command to use to concatenate that will output a file with the same duration?
- Is there a way to do that without reencoding?
- What makes the durations different in the combined files above?