Hi all. 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...? Thanks for any help, Rodolfo
wav is uncompressed, you can put 15 minutes 10 seconds of really horrible music (or even just silence) in there, it will still be 154 MB. The relationship between quality and file size only exists for compressed formats and you will find that the mp3 is much smaller than the wav. -----Ursprüngliche Nachricht----- Von: ffmpeg-user [mailto:ffmpeg-user-bounces@ffmpeg.org] Im Auftrag von Rodolfo Medina Gesendet: Donnerstag, 22. Juni 2017 22:20 An: ffmpeg-user@ffmpeg.org Betreff: [FFmpeg-user] Conversion wav -> mp3 -> wav Hi all. 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...? Thanks for any help, Rodolfo _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
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
Steve Boyer <steveboyer85@gmail.com> writes:
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.
In the two files music starts with a slight delay from one another, and it seems I don't manage to slide them so to eliminate that delay... Any suggestion? Thanks, Rodolfo
On Fri, Jun 23, 2017 at 7:11 AM, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
Steve Boyer <steveboyer85@gmail.com> writes:
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.
In the two files music starts with a slight delay from one another, and it seems I don't manage to slide them so to eliminate that delay... Any suggestion?
Trial and error - zoom in as far as you can, hit play, realize that it's off slightly, shift using the Time Shift Tool (looks like <----> in the toolbar) very very slightly, repeat. It takes some time, but I've done this comparing FFmpeg's encoding using the libfdk_aac encoder vs the aac encoder.
Thanks,
Rodolfo
Steve
Steve Boyer <steveboyer85@gmail.com> writes:
On Fri, Jun 23, 2017 at 7:11 AM, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
Steve Boyer <steveboyer85@gmail.com> writes:
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.
In the two files music starts with a slight delay from one another, and it seems I don't manage to slide them so to eliminate that delay... Any suggestion?
Trial and error - zoom in as far as you can, hit play, realize that it's off slightly, shift using the Time Shift Tool (looks like <----> in the toolbar) very very slightly, repeat. It takes some time, but I've done this comparing FFmpeg's encoding using the libfdk_aac encoder vs the aac encoder.
Now I managed to synchronize them... but all happens is that they play together now... Where's the comparison...? On the first of the two, I applied the `invert' effect. Rodolfo
Hi Rodolfo,
but all happens is that they play together now…
Perfect! For now.
On the first of the two, I applied the `invert’ effect.
Are you sure?
Where’s the comparison…?
That’s what you hear! If you play two exact files „in sync“, and one of them is inverted, you should hear … nothing. Try with two instances of the same file, not one wav-mp3-wav and the other one wav. The process in detail: - select one file in the Finder - right click and „Open with“ Audacity - select the imported file in Audacity; be sure, that the hole file is selected and stays selected for the next step! - >Effects>Inverted (my version is german, so it could be named otherwise in english) - >Import>Sound and select the exact same file, you used on „Open with“ - Play. - If you hear nothing, then the process is correct. If you hear anything but silence, then one of your steps was not correct. - If you select „Solo“ on one of the tracks, the other track gets muted and you can toggle between „the difference“ and the „Solo-ed track. With kindest regards… …Maik Waschfeld
Maik Waschfeld <Maik.Waschfeld@Maik-Waschfeld.de> writes:
Hi Rodolfo,
but all happens is that they play together now…
Perfect! For now.
On the first of the two, I applied the `invert’ effect.
Are you sure?
Where’s the comparison…?
That’s what you hear! If you play two exact files „in sync“, and one of them is inverted, you should hear … nothing.
Try with two instances of the same file, not one wav-mp3-wav and the other one wav.
The process in detail: - select one file in the Finder - right click and „Open with“ Audacity - select the imported file in Audacity; be sure, that the hole file is selected and stays selected for the next step! - >Effects>Inverted (my version is german, so it could be named otherwise in english) - >Import>Sound and select the exact same file, you used on „Open with“ - Play. - If you hear nothing, then the process is correct. If you hear anything but silence, then one of your steps was not correct. - If you select „Solo“ on one of the tracks, the other track gets muted and you can toggle between „the difference“ and the „Solo-ed track.
Thanks... Yes, now it works also for me exactly as you described. But my impression is that the whole thing only works when file1.wav and file2.wav are the same file (silence) or file2.wav is the result of a conversion of file1.wav. Instead, I want to compare the quality of file1.wav and file2.wav fetched, over the net, or copied from CD, from sources completely different and independent one another. For example (I suppose and I see that it works also with mp3 format), now file1.mp3 is fetched from Youtube: https://www.youtube.com/watch?v=SgKHI4jEFEo , and it's Brahms 4th symphony directed by Kurt Sanderling (great!), first movement; and file2.mp3 is the same piece but copied and converted from audio CD: same piece, director, execution: all. In this case, I import file1.mp3, I invert it, then I import file2.mp3: the game does not succeed: what I hear is not the difference between them - as it is when file2.mp3 = file1.mp3 -; what I hear seems rather to be the sum of the two... Am I wrong? I hope to be well explaining myself... In other words, I wish a tool that detect the differences from files with different origines, sources and respective histories... Is that possibile? Thanks, Rodolfo
Hi Rodolfo, Should I have to mention, that it’s not recommended to work on the original files? Copy them within the Finder or your desktop of choice, so Audacity can manipulate the files, as it likes..
Am 24.06.2017 um 09:22 schrieb Rodolfo Medina <rodolfo.medina@gmail.com>: […] In this case, I import file1.mp3, I invert it, then I import file2.mp3: the game does not succeed: what I hear is not the difference between them - as it is when file2.mp3 = file1.mp3 -; what I hear seems rather to be the sum of the two...
That’s strange! As playing two files at the same time, technically is a summing-function, if the result is louder than the single pieces, the invert didn’t work. Maybe one of the files was already inverted, before you got it. Just invert on one of the tracks again. Essential to the process is too, that both tracks sync exactly. So when you manually sync the beginning, do they still sync-match at or near the end of the file? You can and should zoom in on the waveform to do the syncing and checking. If they don’t sync-match completely, they are not identical, source-wise.
I wish a tool that detect the differences from files with different origines, sources and respective histories... Is that possibile?
I’m not aware of an application to do this job, automatically. Sorry! With kindest regards… …Maik Waschfeld
Maik Waschfeld <Maik.Waschfeld@Maik-Waschfeld.de> writes:
Am 24.06.2017 um 09:22 schrieb Rodolfo Medina <rodolfo.medina@gmail.com>: […] In this case, I import file1.mp3, I invert it, then I import file2.mp3: the game does not succeed: what I hear is not the difference between them - as it is when file2.mp3 = file1.mp3 -; what I hear seems rather to be the sum of the two...
That’s strange!
As playing two files at the same time, technically is a summing-function, if the result is louder than the single pieces, the invert didn’t work. Maybe one of the files was already inverted, before you got it. Just invert on one of the tracks again.
Essential to the process is too, that both tracks sync exactly. So when you manually sync the beginning, do they still sync-match at or near the end of the file? You can and should zoom in on the waveform to do the syncing and checking.
If they don’t sync-match completely, they are not identical, source-wise.
I wish a tool that detect the differences from files with different origines, sources and respective histories... Is that possibile?
I’m not aware of an application to do this job, automatically. Sorry!
Yes, the two tracks are perfectly synchronized from beginning to end, the first one is inverted and second isn't. Playing them together is louder than each of them as `Solo'. Same piece, same execution, same recording... Only, one was fetched from Youtube and the other was extracted from audio CD... Rodolfo
Hi Rodolfo,
Am 24.06.2017 um 13:17 schrieb Rodolfo Medina <rodolfo.medina@gmail.com>:
the first one is inverted and second isn't. Playing them together is louder than each of them as `Solo'.
Then don’t invert the first one. With kindest regards… …Maik Waschfeld
Maik Waschfeld <Maik.Waschfeld@Maik-Waschfeld.de> writes:
Hi Rodolfo,
Am 24.06.2017 um 13:17 schrieb Rodolfo Medina <rodolfo.medina@gmail.com>:
the first one is inverted and second isn't. Playing them together is louder than each of them as `Solo'.
Then don’t invert the first one.
Same result... I wish I could send the two files to the list... Rodolfo
With Maik's kind help, I managed to sync the two files I wanted to compare: within Audacity I had to shift one of the two exactly 34ms to the right. Then, after inverting it, by playing them together their difference can be heard. Now, supposed one doesn't know, how is it possibile to tell which one of the two is best quality and which one is the worst? Thanks, Rodolfo
Le primidi 11 messidor, an CCXXV, Rodolfo Medina a écrit :
Now, supposed one doesn't know, how is it possibile to tell which one of the two is best quality and which one is the worst?
If we had an automated way of detecting that, life would be much easier for people who invent codecs. You need to listen to both files and decide which one feels better. Regards, -- Nicolas George
On Thu, Jun 29, 2017 at 14:29:40 +0200, Nicolas George wrote:
Le primidi 11 messidor, an CCXXV, Rodolfo Medina a écrit :
Now, supposed one doesn't know, how is it possibile to tell which one of the two is best quality and which one is the worst?
If we had an automated way of detecting that, life would be much easier for people who invent codecs.
You need to listen to both files and decide which one feels better.
Exactly! I was wondering about the whole point of this thread. The concept of lossy encoding is of course to introduce a difference to the original - a difference which allows storing in less bits per (e.g.) sample. The difference can be visually seen in the waveform or spectrum (or others), but hardly heard by the ear - that's the magic. And unlike video, it seems there are few, if any, methods to measure the *perceived* quality of audio. Check here for some ramblings: https://stackoverflow.com/questions/2945531/determining-the-best-audio-quali... But I challange you to find an algorithm which can compare two audio tracks. (And you need someone with a good ear to confirm its findings. Or reference material and encodings such as SQAM.) But if you do find it, and it's "free" to use, please implement an ffmpeg filter with it. :-) Cheers, Moritz
On Thu, Jun 29, 2017 at 12:37 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
And unlike video, it seems there are few, if any, methods to measure the *perceived* quality of audio. Check here for some ramblings: https://stackoverflow.com/questions/2945531/determining- the-best-audio-quality
But I challange you to find an algorithm which can compare two audio tracks. (And you need someone with a good ear to confirm its findings. Or reference material and encodings such as SQAM.) But if you do find it, and it's "free" to use, please implement an ffmpeg filter with it. :-)
To continue along those lines, I don’t think this is even a problem that one can precisely define. I will start by acknowledging that there exists a boundary where you can define audio quality objectively. Clipping, for instance, destroys sound data, and is objectively bad < https://en.wikipedia.org/wiki/Loudness_war> (but even then, some musicians or sound designers may want that, for industrial or other effects). But there is a difference between objective quality and what people want. Consider the ability of a display to reproduce an image accurately. You can make an objective comparison, but if you go by the display section of an electronics store, you’d find out that people tend to like oversaturated, objectively worse, color < http://www.flatpanelshd.com/focus.php?subaction=showfull&id=1328263571>. And then you have to consider the environment of your audience, which you can’t necessarily control. Audio played in a car has to contend with road noise, while pictures on a TV will look significantly different in a bright store vs. a customer’s home < https://www.cnet.com/news/why-do-plasma-tvs-look-washed-out-in-the-store/>. And then there’s the question of how much quality your audience can detect. The MythBusters did a test with different grades of vodka and determined that yes, an expert can taste the difference between high end and cheap liquor, but your average person doesn’t have so discriminating a palate < http://kwc.org/mythbusters/2006/04/episode_50_bullets_fired_up_vo.html>. So even if you did come up with a good metric, perhaps you don’t _want_ to check it against an audiophile, or a recording engineer, or somebody who has particularly good hearing. Harold
Harold Tessmann <htessmann@control-tec.com> writes:
On Thu, Jun 29, 2017 at 12:37 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
And unlike video, it seems there are few, if any, methods to measure the *perceived* quality of audio. Check here for some ramblings: https://stackoverflow.com/questions/2945531/determining- the-best-audio-quality
But I challange you to find an algorithm which can compare two audio tracks. (And you need someone with a good ear to confirm its findings. Or reference material and encodings such as SQAM.) But if you do find it, and it's "free" to use, please implement an ffmpeg filter with it. :-)
To continue along those lines, I don’t think this is even a problem that one can precisely define. I will start by acknowledging that there exists a boundary where you can define audio quality objectively. Clipping, for instance, destroys sound data, and is objectively bad < https://en.wikipedia.org/wiki/Loudness_war> (but even then, some musicians or sound designers may want that, for industrial or other effects). But there is a difference between objective quality and what people want. Consider the ability of a display to reproduce an image accurately. You can make an objective comparison, but if you go by the display section of an electronics store, you’d find out that people tend to like oversaturated, objectively worse, color < http://www.flatpanelshd.com/focus.php?subaction=showfull&id=1328263571>.
And then you have to consider the environment of your audience, which you can’t necessarily control. Audio played in a car has to contend with road noise, while pictures on a TV will look significantly different in a bright store vs. a customer’s home < https://www.cnet.com/news/why-do-plasma-tvs-look-washed-out-in-the-store/>.
And then there’s the question of how much quality your audience can detect. The MythBusters did a test with different grades of vodka and determined that yes, an expert can taste the difference between high end and cheap liquor, but your average person doesn’t have so discriminating a palate < http://kwc.org/mythbusters/2006/04/episode_50_bullets_fired_up_vo.html>. So even if you did come up with a good metric, perhaps you don’t _want_ to check it against an audiophile, or a recording engineer, or somebody who has particularly good hearing.
But suppose you have a song, or any piece of music... a certain particular precise recording, just that one... and that you find in internet two mp3 different files of that song, from two different web sites, both same size in megabytes. Suppose that the test with Audacity, which we have earlier much spoken of, reveals a difference between them: this means that a portion of the original WAV file during the MP3 conversion has been discarded in more quantity in, say, file1.mp3 than in file2.mp3 (in fact it can be heared). Or also suppose that both files are in wav format but still Audacity reveals a difference between them (because one of them could be - as far as we know - the result of a previous unknown conversion). Then I expect if would be technically possible that we could give an algebraic plus or minus sign to that discarded portion and tell - objectively and not by a simple personal listening feeling - which of the two is the one that contains more information and which less - that's what I would reasonably expect. Rodolfo
Rodolfo Medina <rodolfo.medina@gmail.com> writes:
Harold Tessmann <htessmann@control-tec.com> writes:
On Thu, Jun 29, 2017 at 12:37 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
And unlike video, it seems there are few, if any, methods to measure the *perceived* quality of audio. Check here for some ramblings: https://stackoverflow.com/questions/2945531/determining- the-best-audio-quality
But I challange you to find an algorithm which can compare two audio tracks. (And you need someone with a good ear to confirm its findings. Or reference material and encodings such as SQAM.) But if you do find it, and it's "free" to use, please implement an ffmpeg filter with it. :-)
To continue along those lines, I don’t think this is even a problem that one can precisely define. I will start by acknowledging that there exists a boundary where you can define audio quality objectively. Clipping, for instance, destroys sound data, and is objectively bad < https://en.wikipedia.org/wiki/Loudness_war> (but even then, some musicians or sound designers may want that, for industrial or other effects). But there is a difference between objective quality and what people want. Consider the ability of a display to reproduce an image accurately. You can make an objective comparison, but if you go by the display section of an electronics store, you’d find out that people tend to like oversaturated, objectively worse, color < http://www.flatpanelshd.com/focus.php?subaction=showfull&id=1328263571>.
And then you have to consider the environment of your audience, which you can’t necessarily control. Audio played in a car has to contend with road noise, while pictures on a TV will look significantly different in a bright store vs. a customer’s home < https://www.cnet.com/news/why-do-plasma-tvs-look-washed-out-in-the-store/>.
And then there’s the question of how much quality your audience can detect. The MythBusters did a test with different grades of vodka and determined that yes, an expert can taste the difference between high end and cheap liquor, but your average person doesn’t have so discriminating a palate < http://kwc.org/mythbusters/2006/04/episode_50_bullets_fired_up_vo.html>. So even if you did come up with a good metric, perhaps you don’t _want_ to check it against an audiophile, or a recording engineer, or somebody who has particularly good hearing.
But suppose you have a song, or any piece of music... a certain particular precise recording, just that one... and that you find in internet two mp3 different files of that song, from two different web sites, both same size in megabytes. Suppose that the test with Audacity, which we have earlier much spoken of, reveals a difference between them: this means that a portion of the original WAV file during the MP3 conversion has been discarded in more quantity in, say, file1.mp3 than in file2.mp3 (in fact it can be heared). Or also suppose that both files are in wav format but still Audacity reveals a difference between them (because one of them could be - as far as we know - the result of a previous unknown conversion). Then I expect if would be technically possible that we could give an algebraic plus or minus sign to that discarded portion and tell - objectively and not by a simple personal listening feeling - which of the two is the one that contains more information and which less - that's what I would reasonably expect.
It's as if in Algebra we can do |a - b| but don't know wether it's a < b or b < a... Rodolfo
On Sunday, 2 July 2017 0:31:03 ACST Rodolfo Medina wrote:
But suppose you have a song, or any piece of music... a certain particular precise recording, just that one... and that you find in internet two mp3 different files of that song, from two different web sites, both same size in megabytes. Suppose that the test with Audacity, which we have earlier much spoken of, reveals a difference between them: this means that a portion of the original WAV file during the MP3 conversion has been discarded in more quantity in, say, file1.mp3 than in file2.mp3 (in fact it can be heared). Or also suppose that both files are in wav format but still Audacity reveals a difference between them (because one of them could be - as far as we know - the result of a previous unknown conversion). Then I expect if would be technically possible that we could give an algebraic plus or minus sign to that discarded portion and tell - objectively and not by a simple personal listening feeling - which of the two is the one that contains more information and which less - that's what I would reasonably expect.
It's as if in Algebra we can do |a - b| but don't know wether it's a < b or b < a...
Rodolfo
What about an FFT analysis? -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au ==============================================================
On 2017-06-29 14:17, Rodolfo Medina wrote:
With Maik's kind help, I managed to sync the two files I wanted to compare: within Audacity I had to shift one of the two exactly 34ms to the right. Then, after inverting it, by playing them together their difference can be heard. Now, supposed one doesn't know, how is it possibile to tell which one of the two is best quality and which one is the worst?
My guess is that the mp3 version has less frequency components. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Am Donnerstag, 22. Juni 2017 schrieb Rodolfo Medina :
Hi all.
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...?
Hi Rodolfo, please read here: a) https://en.m.wikipedia.org/wiki/Pulse-code_modulation b) https://en.m.wikipedia.org/wiki/MP3 You're going from a to b and back from b to a. Mathematically you should get the result you're getting, however audio quality, or fidelity is being compromised due to the application of several data reduction and compression methods. If you phase invert file2.wav and add it to file1.wav you will have a difference. Best, Erik
Hi, On Thu, Jun 22, 2017 at 9:20 PM, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
Hi all.
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. Cheers, Kieran.
Thanks for any help,
Rodolfo
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Kieran O Leary <kieran.o.leary@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
Am 22.06.2017 um 22:20 schrieb Rodolfo Medina:
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...?
common sense - something which got lost in step1 can not be restored in step 2 - it's really that simple
participants (12)
-
André Hänsel -
Carlos E. R. -
Erik Dobberkau -
Harold Tessmann -
Kieran O Leary -
Maik Waschfeld -
Moritz Barsnick -
Nicolas George -
Reindl Harald -
Rodney Baker -
Rodolfo Medina -
Steve Boyer