Welcome Guest ( Log In | Register )

mp3gain is NOT lossless
post May 20 2005, 02:44
Post #1

Group: Members
Posts: 367
Joined: 16-November 03
Member No.: 9867

Years ago I read the source code of mp3gain. Since then I always whince when somebody says that it is a lossless conversion. I have not bothered to prove it is not, but this week I read this mentioned so ma ny times that I have to speak up.

Before I start let me tell you that I will not use the precise terms because I do not remember them. It was years ago and I was never into MP3 terminology.

Anyway. MP3 files are a sequence of, let's call them "frames". Each of these have a "gain" associated with. This is a integer number ranging from, say, 0 to 255. Say, a single increment represents "1.5" dB. Now, say, the mp3gain analysis concludes that we have to reduce the volume by 6 dB. Then mp3gain will decrement all these gains by 4. (4*1.5 = 6) and saves this 6dB reduction as a metadata (in some obscure tag format for good measure). So the idea is that when you want to restore the original state you just read this tag and add that 4 to all these gain values. The trouble is that if you have some frame that had gain value that is below integer 4 would need to become negative numbers after the decrement by 4, but the lowest value is 0. So they are set to 0. Now when you "recover" they are end up become 4, but they were less then 4 before. And of course the same argument applies at the top limit of 255.

So in practice it is lossless in the majority of the cases, but not for most of us on this forum who generally bother about digital audio in a rather geekish way.

Boy! I posted onto the wrong forum. Moderators please move it somewhere more appropriate.

This post has been edited by Triza: May 20 2005, 02:52
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 6th October 2015 - 16:38