Home |
Search |
Today's Posts |
|
#1
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
Greetings, all.
I have a bunch of MP3 files I put on my phone (to play while in the car via bluetooth.) The problem is, they came from different sources, and some are louder than others, and it's a PITA to keep changing the volume. I found a neat set of GNU command line audio utilities (SOX). I wrote a messy CMD command file to extract the RMS average decibel level of each song, then used the formula: 10 ^ ((-20 - %RMSLEVEL%) / 20) (I wrote a 'quick&dirty' c++ for this.) to get the volume (amplitude) multiplier for each song to bring it to -20, which is pretty close to the aggregate average of the entire collection. Then I ran an overnight script to adjust the volume of each MP3 file as calculated above. Then, just for fun, I re-ran the original script that calculates the RMS db levels. I expected each song to be exactly -20. They are all pretty close (around -20.5 db), so the volumes are close enough that I've solved my problem. But I am curious. why are they not exactly at -20 db average? There was some clipping for the songs that needed their volume increased. Probably these were just scratches on the original vinyl. But even the ones where volumes were lowered did not go exactly to -20. Am I experiencing a compression-related syndrome? There are tools that let you monkey with this as well, but I probably won't mess with that. I'm just curious. |
#2
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 09/02/2016 17:34, Mike Duffy wrote:
Greetings, all. I have a bunch of MP3 files I put on my phone (to play while in the car via bluetooth.) The problem is, they came from different sources, and some are louder than others, and it's a PITA to keep changing the volume. I found a neat set of GNU command line audio utilities (SOX). I wrote a messy CMD command file to extract the RMS average decibel level of each song, then used the formula: 10 ^ ((-20 - %RMSLEVEL%) / 20) (I wrote a 'quick&dirty' c++ for this.) to get the volume (amplitude) multiplier for each song to bring it to -20, which is pretty close to the aggregate average of the entire collection. Then I ran an overnight script to adjust the volume of each MP3 file as calculated above. Then, just for fun, I re-ran the original script that calculates the RMS db levels. I expected each song to be exactly -20. They are all pretty close (around -20.5 db), so the volumes are close enough that I've solved my problem. But I am curious. why are they not exactly at -20 db average? There was some clipping for the songs that needed their volume increased. Probably these were just scratches on the original vinyl. But even the ones where volumes were lowered did not go exactly to -20. Am I experiencing a compression-related syndrome? There are tools that let you monkey with this as well, but I probably won't mess with that. I'm just curious. Hitting everything with the same sledgehammer clearly doesn't work. And any level adjustment with require a re-encoding, which should make crappy MP3s even more crappy. Possibly to be re-crappified again by Bluetooth (not sure on that one) ! Is *all* the music of a similar dynamic 'nature' to start off with ? If so, all well and good. If not, then each track (or bunch of similar tracks) needs to be addressed separately. geoff |
#3
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]() "Geoff" wrote in message ... On 09/02/2016 17:34, Mike Duffy wrote: Greetings, all. I have a bunch of MP3 files I put on my phone (to play while in the car via bluetooth.) The problem is, they came from different sources, and some are louder than others, and it's a PITA to keep changing the volume. I found a neat set of GNU command line audio utilities (SOX). I wrote a messy CMD command file to extract the RMS average decibel level of each song, then used the formula: 10 ^ ((-20 - %RMSLEVEL%) / 20) (I wrote a 'quick&dirty' c++ for this.) to get the volume (amplitude) multiplier for each song to bring it to -20, which is pretty close to the aggregate average of the entire collection. Then I ran an overnight script to adjust the volume of each MP3 file as calculated above. Then, just for fun, I re-ran the original script that calculates the RMS db levels. I expected each song to be exactly -20. They are all pretty close (around -20.5 db), so the volumes are close enough that I've solved my problem. But I am curious. why are they not exactly at -20 db average? There was some clipping for the songs that needed their volume increased. Probably these were just scratches on the original vinyl. But even the ones where volumes were lowered did not go exactly to -20. Am I experiencing a compression-related syndrome? There are tools that let you monkey with this as well, but I probably won't mess with that. I'm just curious. Hitting everything with the same sledgehammer clearly doesn't work. And any level adjustment with require a re-encoding, which should make crappy MP3s even more crappy. Possibly to be re-crappified again by Bluetooth (not sure on that one) ! Is *all* the music of a similar dynamic 'nature' to start off with ? If so, all well and good. If not, then each track (or bunch of similar tracks) needs to be addressed separately. geoff There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Gareth. |
#4
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 9/02/2016 7:24 PM, Gareth Magennis wrote:
There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Yep, mp3gain and mp3 direct cut for starters. Trevor. |
#5
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 9/02/2016 7:38 PM, Trevor wrote:
On 9/02/2016 7:24 PM, Gareth Magennis wrote: There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Yep, mp3gain and mp3 direct cut for starters. Whoops, I should have checked that URL, you already (sort of) said MP3 direct cut! Trevor. |
#6
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]() "Trevor" wrote in message ... On 9/02/2016 7:38 PM, Trevor wrote: On 9/02/2016 7:24 PM, Gareth Magennis wrote: There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Yep, mp3gain and mp3 direct cut for starters. Whoops, I should have checked that URL, you already (sort of) said MP3 direct cut! Trevor. Just checked mp3again, and that appears to be able to do pretty much what the OP wants. Gareth. |
#7
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 09/02/2016 21:38, Trevor wrote:
On 9/02/2016 7:24 PM, Gareth Magennis wrote: There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Yep, mp3gain and mp3 direct cut for starters. Trevor. mp3dc trimming and cutting sections of the song, sure. And changing amplitude mp3gain in a linear fashion maybe. But changing dynamics changes the actual encoded waveform significantly, which surely requires re-encoding, just as if it was a totally different song (which it effectively is) ? Or does mp3gain actually somehow compress dynamics without (maybe secretly, internally) re-encoding ? geoff |
#8
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
geoff wrote: "- show quoted text -
mp3dc trimming and cutting sections of the song, sure. And changing amplitude mp3gain in a linear fashion maybe. But changing dynamics changes the actual encoded waveform significantly, which surely requires re-encoding, just as if it was a totally different song (which it effectively is) ? Or does mp3gain actually somehow compress dynamics without (maybe secretly, internally) re-encoding ? geoff " NO. And stop speculating and spreading false information - even if it did not originate from you. This is why, 12 years ago, so many good folks were led to believe Saddam Hussein bankrolled and carried out 9/11 for cryin out loud! Original poster: I use mp3gain, and it does NOT futz with the dynamic range of my mp3s. It is simply a VOLUME LEVELER. NOTHING MORE. |
#9
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
Geoff wrote:
But changing dynamics changes the actual encoded waveform significantly, which surely requires re-encoding, just as if it was a totally different song (which it effectively is) ? Or does mp3gain actually somehow compress dynamics without (maybe secretly, internally) re-encoding ? mp3gain doesn't compress dynamics, it alters the overall level at which the track is played back. Just like Dolby AC3 files with their DIALNORM parameter, the mp3 file has a parameter that sets the playback level. You can set it higher or lower and change the volume without changing anything in the encoding. Mind you, if you play with it too much, you can find that encoding artifacts get exaggerated. But that's just the nature of the beast. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis." |
#10
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 9/02/2016 10:23 PM, Geoff wrote:
On 09/02/2016 21:38, Trevor wrote: On 9/02/2016 7:24 PM, Gareth Magennis wrote: There is software that will allow simple mp3 editing, without re-encoding to yet another mp3 and losing even more data. I use this freeware/donation, I assume there must be others out there. http://mpesch3.de1.cc/mp3dc.html Yep, mp3gain and mp3 direct cut for starters. mp3dc trimming and cutting sections of the song, sure. And changing amplitude mp3gain in a linear fashion maybe. But changing dynamics changes the actual encoded waveform significantly, which surely requires re-encoding, just as if it was a totally different song (which it effectively is) ? Or does mp3gain actually somehow compress dynamics without (maybe secretly, internally) re-encoding ? Nope, but I think the OP just wants similar volume levels, not dynamic changes. If listening to recently mastered music, it will already have all the compression you could want. You will probably find the only way to get similar levels is to reduce the peak level of the most highly compressed songs, since most music peaks near enough to 0dBFS these days. MP3gain can reduce peak level without re-encoding. Trevor. |
#11
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On Tue, 9 Feb 2016 20:58:56 +1300, Geoff wrote:
And any level adjustment with require a re-encoding, which should make crappy MP3s even more crappy. Possibly to be re-crappified again by Bluetooth (not sure on that one) ! Thanks, Geoff. This confirms my limited understanding of 'level compression'. And yes, bluetooth is crappy, and most of the MP3s were digitized from the cheap (free?) motherboard audio chip on my PC and about half from cassette tapes and a 'boom box' that had not seen action for 25 years. But it's for the car. Cassette hiss is virtually indistinguishable from road noise, at least to my ears. |
#12
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On Monday, February 8, 2016 at 11:34:06 PM UTC-5, Mike Duffy wrote:
Greetings, all. I have a bunch of MP3 files I put on my phone (to play while in the car via bluetooth.) The problem is, they came from different sources, and some are louder than others, and it's a PITA to keep changing the volume. Ha!! Welcome to the gurus of CD mastering!!! I had to find out the underlying problem, no one here knew! Yeah, Pro they claim!... Forget compression and all that amateur stuff. Get a copy of Goldwave. FIRST, remove VARYING DC offset, very simple. Then, under Edit menu, select the song and give it a Light Dynamic boost! Very simple. From there it's your choice. I found a neat set of GNU command line audio utilities (SOX). I wrote a messy CMD command file to extract the RMS average decibel level of each song, then used the formula: 10 ^ ((-20 - %RMSLEVEL%) / 20) (I wrote a 'quick&dirty' c++ for this.) to get the volume (amplitude) multiplier for each song to bring it to -20, which is pretty close to the aggregate average of the entire collection. Then I ran an overnight script to adjust the volume of each MP3 file as calculated above. Then, just for fun, I re-ran the original script that calculates the RMS db levels. I expected each song to be exactly -20. They are all pretty close (around -20.5 db), so the volumes are close enough that I've solved my problem. But I am curious. why are they not exactly at -20 db average? There was some clipping for the songs that needed their volume increased. Probably these were just scratches on the original vinyl. But even the ones where volumes were lowered did not go exactly to -20. Am I experiencing a compression-related syndrome? There are tools that let you monkey with this as well, but I probably won't mess with that. I'm just curious. Some songs need to be compressed, if not, they sound as good as dead fish compared to vinyl records!! Jack |
#13
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On Mon, 8 Feb 2016 23:34:04 -0500, Mike Duffy wrote:
Greetings, all. I ... used the formula: 10 ^ ((-20 - %RMSLEVEL%) / 20) (I wrote a 'quick&dirty' c++ for this.) But I am curious. why are they not exactly at -20 db average? Upon reading the docs in one of the suggested utilities (mp3gain), I arrived at the answer to my question, which nobody actually addressed. Apparently, the MP3 format only has a resolution of about 1.5 db which is used as the 'base' multiplier for all of the final amplitude values after they have been computed from the other data. If the volume is increased slowly, nothing happens until it is increased enough to bump the base volume multiplier to the next quantum value. Thus we should expect the resultant MP3 encoded signal to have an RMS db level within .75 db of the requested value. The actual value depends on the power integral of the unmultiplied signal envelope. (Excuse me if I have used the wrong terminology. I'm not an audio engineer.) The a/n utility also has a 'album' averaging function, which is great because my Win7 CMD.EXE script was already a few pages long and I was thinking about how to keep relative track volumes within an album consistent with their original ratios. Thanks again to all who replied. Are you all always this polite and helpful? Over the years I've roamed a lot of usenet groups and this one seems to be missing the usual collection of egotists, boneheads, and deliberate trolls. Now that I've got the knowledge I came here to seek, maybe I'll lurk a while just to see if I managed to catch everyone on a good day or if the bozos were all hung over from superbowl parties. |
#14
![]()
Posted to rec.audio.pro
|
|||
|
|||
![]()
On 10/02/2016 4:14 PM, Mike Duffy wrote:
Thanks again to all who replied. Are you all always this polite and helpful? Over the years I've roamed a lot of usenet groups and this one seems to be missing the usual collection of egotists, boneheads, and deliberate trolls. Now that I've got the knowledge I came here to seek, maybe I'll lurk a while just to see if I managed to catch everyone on a good day or if the bozos were all hung over from superbowl parties. Unfortunately there are a couple of bozo's here, (and a couple just have their bad days) but definitely not as bad as many other groups IME. Trevor. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2pid, I want to understand your 'differing POV' | Audio Opinions | |||
2pid, are you afraid of differing POVs? | Audio Opinions | |||
MP3s from PC to Stereo - Volume too low | Tech | |||
MP3s from PC to Hi-Fi....Volume Too Low!...is there a way to add power? | Audio Opinions | |||
Why are Aux. sources lower in volume? | Car Audio |