On Thu, Jun 22, 2017 at 3:20 PM, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
Hi all.
Hi!
As an experiment, I converted a .wav file to mp3 format and then back into wav again, just to see what happens:
$ ffmpeg -i file1.wav file1.mp3 $ ffmpeg -i file1.mp3 file2.wav
I've always heard and read that the first step produces a loss in quality. So I would expect that to be seen in a reduction of size. Instead, I was suprised to see that file1.wav and file2.wav are both 154M large. Also the output of `ffmpeg -i' is almost the same for the two: in both cases, there is:
Duration: 00:15:10.84, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
So I wonder, and am asking to you listers, in where that quality loss is shown and how it can be detected. Or maybe should we think and conclude that the original quality is restored with the second step...?
The conversion from WAV to MP3 is lossy, reducing the filesize by controlling the bitrate. "expanding" the MP3 back to a WAV file, it restores the large bitrate of 1411 kb/s, but it is sampling from the MP3 file, thus "expanding" the filesize back to 154MB. The original quality is lost in the last WAV file - the file sizes are just the same because they are the same bitrate. If you want to see what really happened, import both files into Audacity, use a filter to invert one of the files, and slide it around until they are 1:1 (it's off slightly IIRC) and then hit "Play" or downmix to a single track. If both tracks are aligned correctly, you will hear the discarded portions of the original WAV file during the MP3 conversion.
Thanks for any help,
Rodolfo
Steve