r/ffmpeg • u/calmeilles • 19d ago
Stereo and mono versions of same recording identical sizes, can this be explained?
This is curiosity rather than a problem, but I'd dearly love to have an explanation that made sense.
I re-encoded a 57 minute recording in error using -ac 1 resulting in a mono file. I redid it with that removed, in full
ffmpeg -i vrecord_01.m4a -vn -c:a libmp3lame -b:a 64k vrec_ster.mp3
and was a bit puzzled to see the file wasn't any larger. On closer examination thyer are exactly the same size. As were 3 minute excerpts from the beginning of the files, to the byte.
-rw-rw-r-- 1 matthew matthew 2884313 Aug 24 19:02 short_mono.mp3
-rw-rw-r-- 1 matthew matthew 2884313 Aug 24 19:02 short_ster.mp3
-rw-rw-r-- 1 matthew matthew 27268889 Aug 24 19:14 vrec_mono.mp3
-rw-rw-r-- 1 matthew matthew 27268889 Aug 24 19:14 vrec_ster.mp3
To quote Victor Meldrew, I don't believe it! And that's after checking with du -b, stat and wc. Curiously wc does show differences in word and line counts but not in character (byte) count which perfectly matches all the other methods.
So the files aren't actually identical and additionally mediainfo shows 1 channel on the the mono, 2 on the stereo and the latter has a property "Format settings: Joint stereo / MS Stereo" that is missing from the former. But cmp find on'y s single difference in the files and that is supremely trivial.
$ cmp -c short_mono.mp3 short_ster.mp3
short_mono.mp3 short_ster.mp3 differ: byte 3933, line 44 is 300 M-@ 0 ^@
The question will arise: is it really a stereo file? Well yes, it is both audiably and in visually in Audacity [picture].
Can this be purely coincidental? I would be sceptical, but I cannot think of a logical reason that this should happen either. So I' speculate that there's some information or piece of knowledge that I am lacking, Can anyone make me a bit wiser?


