[FFmpeg-user] Conversion wav -> mp3 -> wav

Rodolfo Medina rodolfo.medina at gmail.com
Fri Jun 23 01:02:10 EEST 2017


Kieran O Leary <kieran.o.leary at gmail.com> writes:

>> 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.
>
>
> Yes, it is lossy compression.
>
>
>>   So
>> I would expect that to be seen in a reduction of size.
>
>
> Yes, your mp3 is much much smaller than the WAV.
>
>
>>   Instead, I was suprised
>> to see that file1.wav and file2.wav are both 154M large.
>
>
> Your WAV files contain 16-bit, 44khz stereo streams at 1411 kb/second. They
> will always be the same file size, regardless of what values the samples
> hold.
>
>
>> 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
>>
>> Why should it be any different?
>
>
>> So I wonder, and am asking to you listers, in where that quality loss is
>> shown
>> and how it can be detected.
>
>
> You'd have to analyze the samples in some way. I am more familiar with
> video, so if I did something similar like:
> File1.mov is 8-bit uncompressed video and 100 MB and it looks nice.
> File 2.mpeg is an 8-bit mpeg1video and is 1MB and it looks TERRIBLE.
> File3.mov is an 8-bit uncompressed transcode of File2.mpeg and it is 100MB
> and looks TERRIBLE. But it's the same file size and ffmpeg -i probably
> looks very similar.
>
> If a better codec was used and it was difficult to tell the difference by
> eye, i'd use something like QCTools which would allow me to view the
> components of the video, and very quickly detect that a lossy compression
> stage had occured.
>
> Or maybe should we think and conclude that the
>> original quality is restored with the second step...?
>>
>
> No, it hasn't. You just have the same loss of quality in File3.WAV that
> existed in file2.mp3. It's just a bigger file size.


Thanks all of you...  Now it's much clearer to me.  I will certainly use
Audacity, as you suggest, to compare the two files.  Can it do the same also
with two mp3's?  The reason of my question and the present thread is the
following.  Nowadays there are so many different possibilities to fetch, say, a
certain musical execution over the net, or from audio CD.  There is Youtube, of
course, and also other platforms or simply capturing audio stream from any site
and place.  So it happened to me to have the same musical masterpiece and
execution, but downloaded, or recorded, or simply copied from CD, from various
different `places' and sources.  I wish to compare all those, curious to see
what the best and most reliable among all those sources is or are...

I'll be trying the comparison as suggested and hope it's simple to do...

Regards,

Rodolfo



More information about the ffmpeg-user mailing list