[FFmpeg-user] Conversion wav -> mp3 -> wav
steveboyer85 at gmail.com
Thu Jun 22 23:39:46 EEST 2017
On Thu, Jun 22, 2017 at 3:20 PM, Rodolfo Medina <rodolfo.medina at gmail.com>
> Hi all.
> As an experiment, I converted a .wav file to mp3 format and then back into
> 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
> to see that file1.wav and file2.wav are both 154M large. Also the output
> `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 ( / 0x0001), 44100 Hz,
> stereo, s16, 1411 kb/s
> So I wonder, and am asking to you listers, in where that quality loss is
> 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,
More information about the ffmpeg-user