Normalize mp3 volume level: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
[[Category:Ubuntu Audio]] | [[Category:Ubuntu Audio]] | ||
[[Category:201102]] | [[Category:201102]] | ||
== RVA == | |||
* http://normalize.nongnu.org | |||
With the following command volume information is stored in every selected mp3 so that a player with support for RVA (Relative Volume Adjustment) can play the mp3 at a normalized level. The encoded audio itself is not altered. With option '-m' an average volume level is calculated over the collection of files first to use as the targeted relative average volume. | |||
Note: your mp3 player needs to support RVA. | |||
<syntaxhighlight lang=bash> | |||
sudo apt-get install normalize-audio | |||
normalize-audio -m -v * | |||
</syntaxhighlight> | |||
If your mp3 player does not support RVA you can use the following statement. The following command will adjust the volume by de-coding the mp3 to WAV using the RVA volume adjustment and then it is re-encoded to 128 bit mp3 (change this if you like). | |||
Note: | |||
* you need 'lame' and 'mpg123' codecs | |||
* depending on the size can take a lot of drive-space and time | |||
* your mp3 files will have the same bitrate | |||
* you will loose some quality in the process - using a higher bitrate you still will loose some quality AND disk space as well. | |||
<syntaxhighlight lang=bash> | |||
sudo apt-get install mpg123 | |||
normalize-mp3 -m -v --bitrate 128 --mp3encode="lame -h -quiet --preset %b %w %m" * | |||
</syntaxhighlight> | |||
== ReplayGain == | == ReplayGain == | ||
| Line 7: | Line 31: | ||
* http://manpages.ubuntu.com/manpages/hardy/man1/mp3gain.1.html | * http://manpages.ubuntu.com/manpages/hardy/man1/mp3gain.1.html | ||
ReplayGain is a different standard for almost the same thing. One difference is that it | ReplayGain is a different standard for almost the same thing. One difference is that it can't calculate an average over a collection of mp3's, it tunes all music to an 'universal volume level'. To enable ReplayGain in Rhythmbox musicplayer: in the menu go to Edit, Plugins and check 'ReplayGain' you can also set preferences. | ||
Note 20130628: this setting seems to have no effect in Rhythmbox. | Note 20130628: this setting seems to have no effect in Rhythmbox. | ||
| Line 38: | Line 62: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
mp3gain -r -k -p * | mp3gain -r -k -p * | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 06:06, 17 October 2019
RVA
With the following command volume information is stored in every selected mp3 so that a player with support for RVA (Relative Volume Adjustment) can play the mp3 at a normalized level. The encoded audio itself is not altered. With option '-m' an average volume level is calculated over the collection of files first to use as the targeted relative average volume.
Note: your mp3 player needs to support RVA.
sudo apt-get install normalize-audio normalize-audio -m -v *
If your mp3 player does not support RVA you can use the following statement. The following command will adjust the volume by de-coding the mp3 to WAV using the RVA volume adjustment and then it is re-encoded to 128 bit mp3 (change this if you like).
Note:
- you need 'lame' and 'mpg123' codecs
- depending on the size can take a lot of drive-space and time
- your mp3 files will have the same bitrate
- you will loose some quality in the process - using a higher bitrate you still will loose some quality AND disk space as well.
sudo apt-get install mpg123 normalize-mp3 -m -v --bitrate 128 --mp3encode="lame -h -quiet --preset %b %w %m" *
ReplayGain
ReplayGain is a different standard for almost the same thing. One difference is that it can't calculate an average over a collection of mp3's, it tunes all music to an 'universal volume level'. To enable ReplayGain in Rhythmbox musicplayer: in the menu go to Edit, Plugins and check 'ReplayGain' you can also set preferences.
Note 20130628: this setting seems to have no effect in Rhythmbox.
Install:
sudo apt-get install mp3gain mp3gain *
Analyze and set the ReplayGain information in the APEv2 tag:
mp3gain -p *
Show tags:
mp3gain -s c *
Here are some options to analyze and apply the calculated gain to the audio stream. Your audio player then does not need to support ReplayGain:
-r apply gain to audio stream
-k if needed, lower the volume to prevent clipping of audio
-p preserve file timestamp
mp3gain -r -k -p *