LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mp3gain-and-Saving Improvements? (https://www.linuxquestions.org/questions/linux-software-2/mp3gain-and-saving-improvements-680160/)

chime 10-30-2008 10:17 PM

mp3gain-and-Saving Improvements?
 
I absolutely love mp3gain. 1by1 I am increasing volume on my
mp3s. However, for example, when we upgraded
from FC6 to FC9, all the changes
I had made were gone.
Also, the fact that there is a -u switch
to undo changes, how would I
make my improvements permanent?
By chance are their similar console commandline
tools where I can increase volume of video files?
Thanks so much in advance--and-I have written
an author of mp3gain, but have not heard
anything

David the H. 10-31-2008 09:15 AM

Replay gain works at the file level. Upgrading your distro shouldn't affect that unless the media player(s) you used have also changed.

In general, all replay gain does is add some metadata tags to the file that can be read by replay-gain-enabled software, allowing them to dynamically adjust the volume on the file to match a constant level.

However, looking at the man page, it looks like mp3gain has the option of going one step further and can actually apply the gain to the audio track itself, effectively permanently adjusting the volume level.

From the man page:
Quote:

mp3gain actually changes your file’s gain only when you use one of the options -r, -a, -g, or -l. If none of these options is given, only a tag denoting the recommended gain change is written to the file. If you only want to print the recommended gain change (and not modify the file at all) you have to use the -s s (skip tag) option.

David the H. 10-31-2008 09:38 AM

Reading the question again, I guess I should make it clear that the effects of mp3gain are permanent, because the gains are written directly to the file itself (either through an added tag or directly to the audio stream). Once you apply it, it's there until you go back and remove it again (which is what the -u option is there for).

As for video, I think there are just too many different formats and options for any one program to deal with. Also, replay gain generally doesn't work that way, as it generally works through the file's metatags (mp3gain seems to be unique in this regard). I suppose it could work theoretically, but metatagging of video is non-standardized and haphazard at best. As it is, to change the volume of a video file you have to extract the audio stream from the video, run it through some kind of audio processing software such as sox to boost the volume, and then re-multiplex the modified stream back in.

David the H. 11-03-2008 04:56 AM

This may be a bit late to post, but I was playing around with mp3gain last night and as a result I also did a bit of net research.

I can see why there's some confusion now; because the documentation is rather unclear. The man page I have was apparently created by the Debian maintainers and did not come from the mp3gain programmers themselves, and so it seems to be wrong on some points. mp3gain does not ever alter the audio data in files at all, as I had assumed from the way it was written, but only adds a set of additional metadata tags to the file in the APEv2 tag format. These are usually "hidden" from the user, who only sees the id3 tags, but playback software can read them.

(It was the fact that the new tags are not id3 that confused me here, because none of my tag reading software displays the replay gain information).

The man page was also slightly wrong in the quote I gave above as well. nothing will be written to the file unless you use one of the -r, -a, -g, or -l flags; all of which will simply attach the APE tags to the file. Anything else will only analyze the file and display the recommended changes on the standard output. And consequently, the -u flag will simply remove any mp3gain tags it finds on the file in question.

On a final note, I discovered something not directly related to this question, but which I think is helpful to know. The vorbisgain man page says that it targets a gain level of 89dB by default, which is higher than the level recommended by the replay gain authors. But the documentation doesn't make it clear what level mp3gain targets. However, in my reading I learned that mp3gain does indeed also target the same 89dB level, so you don't need to do anything special to ensure that your ogg vorbis and mp3 files have the same volume adjustments.

Hope this clears things up.


All times are GMT -5. The time now is 04:59 PM.