IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Why is peak affected by WAV -> MP3 -> WAV conversion?, was: "Replay gain tricks" in fb2k - Support
alter4
post Jun 29 2013, 10:24
Post #1





Group: Members
Posts: 105
Joined: 14-September 04
From: Belarus, Vitebsk
Member No.: 16992



I faced very strange issue, at least for me.
I have a wav file,
1)foobar2000 (I used 1.2.8) replaygain after scan said, it had track peak 0.994385 and that was OK
2) I converted this file to lame 3.99.5 mp3 using foobar2000 and replaygain said for the mp3 it had track peak 1.067684
3) then I converted mp3 to wav and got track peak 1.000000
4) I checked the mp3 file with another replaygain tool (aimp 3.50) and got 1.00031 value

The question actually how wav -> mp3 conversion could affect peak track value so significantly?
Why mp3 - > wav conversion reduced peak track level? AFAIK it is lossless conversion operation?
Why different tool gives the different value for the same file and what hell is going on here actually?))

P.S.Check another wav from my collection with high (0.99) peak value and got the same kind of results.

This post has been edited by alter4: Jun 29 2013, 10:28
Go to the top of the page
+Quote Post
ChronoSphere
post Jun 29 2013, 12:09
Post #2





Group: Members
Posts: 399
Joined: 11-March 07
Member No.: 41384



Someone here recently mentioned that on lower bitrates, the mp3 encoder would mess with the volume to achieve better results. Maybe it comes from this? Which bitrate did you encode to?
Go to the top of the page
+Quote Post
carpman
post Jun 29 2013, 13:20
Post #3





Group: Developer
Posts: 1307
Joined: 27-June 07
Member No.: 44789



MP3 encoding can introduce clipping (only apparent on decode, which is where replay gain levels are calculated):
See: http://www.hydrogenaudio.org/forums/index....st&p=428436
That's why you get a result > 1.

EDIT: For the answer to your second question re. "then I converted mp3 to wav and got track peak 1.000000":
See: http://www.hydrogenaudio.org/forums/index....st&p=428279

QUOTE
With fixed point data, 0dB FS, or “digital full scale” is the largest value you can store - anything bigger will be clipped to that largest possible value.

That's why when it's converted to fixed point 16bit PCM WAV it's = 1.


Read the 2 posts I linked to and that will explain everything you asked.

C.

EDIT: Added the answer to part 2.

This post has been edited by carpman: Jun 29 2013, 13:33


--------------------
TAK -p4m :: LossyWAV -q 6 | TAK :: Lame 3.98 -V 2
Go to the top of the page
+Quote Post
lvqcl
post Jun 29 2013, 15:43
Post #4





Group: Developer
Posts: 3208
Joined: 2-December 07
Member No.: 49183



And about "why different tool gives the different value for the same file": it seems that AIMP clips the output of its decoder (or maybe its decoder clips itself). So AIMP gives incorrect result of track/album peaks.
Go to the top of the page
+Quote Post
db1989
post Jun 29 2013, 20:00
Post #5





Group: Super Moderator
Posts: 5141
Joined: 23-June 06
Member No.: 32180



As this does not reflect an issue with foobar2000 and is a general phenomenon associated with MP3, I have moved it to the relevant subforum.
Go to the top of the page
+Quote Post
saratoga
post Jun 29 2013, 20:06
Post #6





Group: Members
Posts: 4715
Joined: 2-September 02
Member No.: 3264



Mp3 is a lossy format. If you want the output to be lossless try flac.
Go to the top of the page
+Quote Post
alter4
post Jun 30 2013, 16:02
Post #7





Group: Members
Posts: 105
Joined: 14-September 04
From: Belarus, Vitebsk
Member No.: 16992



Thanks guys for the answers, things are more clear for me now.

QUOTE
Which bitrate did you encode to?
320

What is interesting, I actually tried mp3gain for the same file. Foobar2000, aimp and mp3gain gave me different values of gain, but took it easy now, just added in my favorite foobar2000 advanced limiter DSP effect, it causes small compression, but I like this way.

This post has been edited by alter4: Jun 30 2013, 16:03
Go to the top of the page
+Quote Post
[JAZ]
post Jun 30 2013, 19:41
Post #8





Group: Members
Posts: 1706
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



about replaygain value: foobar2000 now uses a new algorithm (based on R128), aimp has the bug you were told and mp3gain uses the classic replaygain algorithm.
Go to the top of the page
+Quote Post
ChronoSphere
post Jun 30 2013, 20:10
Post #9





Group: Members
Posts: 399
Joined: 11-March 07
Member No.: 41384



Also, MP3Gain is limited to 1.5dB increments from what I remember.
Go to the top of the page
+Quote Post
db1989
post Jun 30 2013, 23:21
Post #10





Group: Super Moderator
Posts: 5141
Joined: 23-June 06
Member No.: 32180



Correct. It functions by altering the global gain scale factor, which is quantised to a resolution of 1.5 dB.
Go to the top of the page
+Quote Post

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: 17th April 2014 - 11:08