Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ReplayGain & audio editing (Read 2137 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain & audio editing

Hi all,

I have a ReplayGain related question which I hope some of you will be able to answer.

The situation is as follows: I have 2 MP3s of the same radio show, but broadcasted at different times with some minor content differences and a different bitrate. One is encoded at 96k and the other at 128k. In terms of content the broadcast that was published as a 96k MP3 is the most complete, i.e. it contains a few sections which were cut out the broadcast which was published as a 128k MP3.

What I would like to create is a single audio file that contains the entire show but at the best possible audio quality.

To achieve this I plan to:
- convert both MP3s to wave/pcm (using fb2k)
- use Audacity to copy the sections that are missing in the 128k version from the 96k version into the right places in the 128k stream
- save the result as FLAC to avoid lossy-to-lossy quality loss

Schematically:
96k stream: (s1)-(s2)-(s3)-(s4)-(s5)
128k stream: (s1)-(missing)-(s3)-(missing)-(s5)
merged: (s1 from 128k)-(s2 friom 96k)-(s3 from 128)-(s4 from 96k)-(s5 from 128)

The problem I have is that both source tracks have different ReplayGain values:
- the 96k one has track gain +1.74dB / track peak 0.758728;
- and the 128k one has +1.47 db / 0.692627.

So now my question: which gain should I apply when converting to wave/pcm in order to make the files have "matching" loudness before starting to cut/paste in Audacity?
I see multiple possibilities:
A) apply each track's own track gain;
B) apply the track gain of 96k track to both;
C) apply the track gain of 128k track to both;
D) apply album gain (+1.60dB / 0.758728) to both.

Moreover the fb2k converter has multiple ways of applying RG:
X) "apply gain";
Y) "apply gain and prevent clipping according to peak";
Z) "prevent clipping according to peak".

So can someone tell me which combination A-B-C-D and X-Y-Z is the correct one to convert my MP3s before starting to edit the audio in Audacity?

Thanks in advance!

Thor


ReplayGain & audio editing

Reply #2
the 96k one has track gain +1.74dB [...] and the 128k one has +1.74 db

???

Sorry, I made a dyslectic typo. The correct values are:
- the 96k one has track gain +1.74dB / track peak 0.758728;
- and the 128k one has +1.47 dB / 0.692627.
(also edited original post)

ReplayGain & audio editing

Reply #3
I think it's better to do this:

1) apply the track gain of 128k track to it;
2) take (s1) (s3) (s5) from 96k track, calculate its RG level and apply it to the whole 96k track

In this case you'll use the same audio content to calculate RG levels.

ReplayGain & audio editing

Reply #4
I think it's better to do this:

1) apply the track gain of 128k track to it;
2) take (s1) (s3) (s5) from 96k track, calculate its RG level and apply it to the whole 96k track

In this case you'll use the same audio content to calculate RG levels.

Cool. That makes sense.
By "take ... from" I'm assuming you mean cut/delete?

ReplayGain & audio editing

Reply #5
Yes, cut these parts from 96k track, combine them into a separate (temporary) track and calculate its RG level.

ReplayGain & audio editing

Reply #6
If you don't hear any differences in loudness, I wouldn't worry about ReplayGain at all.    If you do hear a difference, you may be better off adjusting by ear.

If you have a few tracks (or two tracks) to volume-match the best approach is usually to normalize the tracks independently for "maximized" 0dB peaks.  Then the volumes don't match, choose the quietest-sounding track as your reference and adjust the other tracks(s) down to match (by ear).

If you have a large number of tracks where it's impractical to do it by ear, ReplayGain (or something like ReplayGain) is more practical.

Of course, match the loudness before cutting & splicing. 

If you choose to use ReplyGain for volume matching, use track gain to adjust each track independently.  Album gain adjusts all of the songs in an album by amount which maintains the relative loudness between tracks as the artist originally intended...  Loud songs remain loud and quiet sounds remain quiet.  Track gain adjust each track to the same volume so quiet songs get louder and/or loud songs get quieter..


Quote
Moreover the fb2k converter has multiple ways of applying RG:
X) "apply gain";
Y) "apply gain and prevent clipping according to peak";
Z) "prevent clipping according to peak".

So can someone tell me which combination A-B-C-D and X-Y-Z is the correct one to convert my MP3s before starting to edit the audio in Audacity?
Avoid clipping if you want to avoid distortion.

I don't know the difference between Y & Z.  But a peak of 0.758 is -2.4dB.*  That means you can boost by 1.74dB and you'll still be below clipping by about 1/2dB.




*    20log(0.758) = -2.4dB

ReplayGain & audio editing

Reply #7
Thanks for your elaborate answer. However, I'm not sure how to interpret it. Say I so want to use RG (and not ear matching). Which scenario would you advice me to use? A+Y?

Edit: Or perhaps I should use lvqcl's suggestion (instead of A), which I'll call A*.
So would A*+Y be what you would advise me to do?

ReplayGain & audio editing

Reply #8
I would load up a portion of the same audio from both tracks and just adjust it so that the amplitude is the same.

 

ReplayGain & audio editing

Reply #9
The ReplayGain values are only 0.26 dB apart. Humans generally can't detect volume changes smaller than 1 or 1.5 dB, so I don't think there is any relevant difference in the files' volume. I would just leave the levels alone, listen to the finished product to see if anything sounds off, and adjust the volume by ear if by some chance there is a difference.