Skip to main content
Topic: R128Norm (Read 42340 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: R128Norm

Reply #75
/d /c ffmpeg.exe -i - -ignore_length true -af "dynaudnorm=s=30:r=0.1:p=0.9" -c:a pcm_f32le -f wav - | lame.exe --ignorelength --noreplaygain --abr 128 - %d

Subtle compression (s) is added to soften towering noises from clothes and possible transcoding glitches. RMS processing (r) is enabled to amplify voice fluctuations more harmoniously by taking into account not only the peaks but also the quieter parts. Normalization threshold (p) is lowered from default 0.95 to 0.90 to leave more headroom (around -1 dB) for future enhancing (e.g. portable player’s EQ). Frame length (f) and Gaussian window size (g) are not adjusted as you suggested, because the speaker’s breath becomes accentuated. Having said that, I welcome amendments and additions.

I have no clever ideas for the sort of audio you're compressing. I mainly use the DAN to compress soundtrack audio where I prefer the response to volume changes to be very fast.

I think lame accepts 32 bit float input but converts to 24 bit integer before encoding. Probably no big deal, but you might be better off encoding with ffmpeg, given it uses LAME for MP3 encoding anyway.

Maybe I should have mentioned it in my last post (it didn't occur to me at the time) but there's RockSteady if you want to try something else. I use it daily  because I compress soundtrack audio on playback via RockSteady & ffdshow's WinAmp filter (rather than compress when converting), but there's a WinAmp DSP bridge for fb2k so you can run RockSteady that way. I don't know if it'll necessarily do a better job than the Dynamic Audio Normaliser. Maybe just different, so to speak.

It's limited to stereo and 16 bit input (at least that's all I can get to work with ffdshow) and tends to crash fb2k if you try to encode more than one file at a time (I think the Winamp bridge is to blame), but one at a time is fine.
On the plus side.... it has a GUI and you could add it as a DSP to the playback chain and fiddle around, without having to convert the audio to hear the result.

Re: R128Norm

Reply #76
yetanotherid, luckily, the author of Dynamic Audio Normalizer is responsive via Videohelp’s thread and e-mail, I’ll keep posted of his thoughts on the case, if any.

Conversion to MP3 via LAME library of FFmpeg’s 3.4.2 is somehow slow compared to piped processing via LAME 3.100 as follows.

SpeedSettings
18x/d /c ffmpeg -i - -ignore_length true -af "dynaudnorm=s=30:r=0.12:p=0.9" -c:a libmp3lame -abr 1 -b:a 128k %d
50x/d /c ffmpeg -i - -ignore_length true -af "dynaudnorm=s=30:r=0.12:p=0.9" -c:a pcm_f32le -f wav - | lame --ignorelength --noreplaygain --abr 128 - %d
70xFoobar2000’s DSP such as EBU R128 Normalizer & lame --ignorelength --noreplaygain --abr 128 - %d

Re: R128Norm

Reply #77
yetanotherid, luckily, the author of Dynamic Audio Normalizer is responsive via Videohelp’s thread and e-mail, I’ll keep us informed of his ideas if any.

You meant doom9 I assume?
I had a discussion there about the stand-alone DAN not supporting a fake wave header.
https://forum.doom9.org/showthread.php?p=1796307#post1796307 (hello_hello ID)
It makes it somewhat impractical for use with a GUI. Fortunately there's ffmpeg.
As a "fake" wave header is so universally supported, I had no idea it was technically a hack until then, but I still think it's kind of silly not to support it.

Conversion to MP3 via LAME library of FFmpeg’s 3.4.2 is somehow slow compared to piped processing via LAME 3.100 as follows.

I had noticed that. I've no idea why. The main reason I tend to use ffmpeg for MP3 encoding though, is the encoder seems perfectly capable of encoding peaks above 0dB, but because LAME converts the input to 24bit integer before encoding it clips any peaks above 0db. That doesn't seem to happen when encoding with ffmpeg.
It's just a laziness thing. Sometimes I downmix to stereo and use ReplayGain/fb2k to losslessly adjust the output files to the same volume, so it means I don't have to stress about clipping when encoding so much.

Also, I noticed the later approach makes a highly fragmented output.
In my case, a file with normalized lecture (duration 2 h 38 min, size 113 MB) consists of 500+ fragments according to Contig’s report.

That's something I never would have checked, although I usually defragment by accident as I have fb2k writing the output files to one drive/partition before moving them to another for storage. :)

Re: R128Norm

Reply #78
Hi.
kode54, the plugin is good! Thank you.

But, using it together with "skip silence (mod)" DSP and "crossfade (internal)" functions, I've noticed that "silence" in tracks causes cutting a "non-silent" part of track which is close to the "silent" part in the end. Tried bigger out buffer (normally 2000ms, increased to 5000ms). Crossfade in 500ms, out 1500ms.

Re: R128Norm

Reply #79
Found a workaround. Instead of internal crossfader (on automatic track change) used separate crossfader DSP with the same duration (1500ms). Since that no problem. :-/

Re: R128Norm

Reply #80
Hi, thanks Kode54 for this plugin :)

I'm having a couple of problems…

1. First, I'm not even sure the plugin is working? I've added it in the DSP manager, but I don't hear any obvious difference to the overall volume level. Is there any way to know that it's running?

2. How do you access the controls? Assuming it's working, the rate of volume change doesn't seem fast enough, and the compression isn't as high as I'd like: parts of the music still seem too quiet. I want the volume to be completely even throughout a song, including at the end when the song fades out - I want the noise during silence to be as loud as the music. (This is how the normalizer works in Daum PotPlayer and I really like it that way.) And if this plugin can't do this, what can?

3. The reason I want a normalizer is to have a completely smooth volume curve to protect my ears during headphone listening. But since I'll only use it with headphones, I'd like to be able to toggle it on/off quickly, ideally with a keyboard shortcut. Is there any way to quickly toggle it without going into the DSP prefs?

By the way, thanks for Carpman for the excellent suggestion of boosting audio by adding the Graphic Equalizer and Advanced Limiter to the DSP stack. Foobar is a little too quiet by default.

Re: R128Norm

Reply #81
I only made it as a proof of concept. It has no configuration, it's meant to be subtle, and it was designed more for making loud music quiet, not for making every quiet piece of music as loud as your line will allow.

If you don't like it, consider contributing to the source code repository. Pull requests are welcome, although they're no guarantee of accepting user changes. Or use that PotPlayer thing to blast your music.

Re: R128Norm

Reply #82
(...)
3. The reason I want a normalizer is to have a completely smooth volume curve to protect my ears during headphone listening. But since I'll only use it with headphones, I'd like to be able to toggle it on/off quickly, ideally with a keyboard shortcut. Is there any way to quickly toggle it without going into the DSP prefs?

By the way, thanks for Carpman for the excellent suggestion of boosting audio by adding the Graphic Equalizer and Advanced Limiter to the DSP stack. Foobar is a little too quiet by default.

1. Yes, it is possible to add keyboard shortcut to certain saved DSP chain - just go to Preferences and look for Keyboard shortcuts and dig through available options. Remember to save your chain before attempting making shortcut.

2. You present VERY interesting point of view... You want to protect your ears and you perceive foobar as "too quiet" so you are looking for ways to modify its operation by trashing your music with excessive, boosted loudness, using limiters, equalizers, compressors... Let me explain something to you: it doesn't work like that. The more "smooth volume curve" and the bigger volume is (at the same time), the quicker your ears become tired - on a daily basis. And you quicker become deaf as you grow older - on a longer perspective. You can protect your ears by not modifying music dynamics AND using ReplayGain, choosing processing for example as "track+prevent clipping" and simply listening to music not so loud. Avoiding big loudness/volume is the best way to protect ears and hearing. I can tell you this as an employee of hearing aids manufacturer, with background in audiology. Especially if you listen on headphones, big loudness shouldn't be necessary for good music sensations. Plus increased humidity under headphones unfortunately make things worse, when compared to high volumes exposure in free field (no head/earphones).

BUT if you just want to boost loudness, "smoothen volume curve", etc. because you like it - then OK, do this - it is all up to your free choice, but don't lie yourself, that you are "protecting your ears". Occasional peaks aren't that harmful as continuous high loudness level. People's hearing abilities survives peaks coming from blasting bombs or crackers close to them. But people working in places where there is continuous high loudness level (factories, mines, etc.) suffer from ordinary deafness. Think of it.

 

Re: R128Norm

Reply #83
kode54,

Thanks for your reply. I hope I didn't come across as ungrateful, that was not my intention. A subtle normalizer is still useful, and better than nothing. I assumed there was configuration because on page 2 you listed some of the variables? I guess that's something only you can change. I'm certainly not clever enough to change code myself.

Epicforever,
Thanks for the tips and advice, I appreciate what you're saying.

Firstly, I should clarify that I use earbuds (I was just using the generic term "headphones" for simplicity, but I guess in a forum like this I ought to be more precise!) As a matter of fact, I absolutely hate headphones and IEMs. Cannot stand either of them. The only type of headphone I could bear to use is ear buds.

As for Foobar's loudness, the program really does seem a little quiet to me, on my hardware. But it's not that I want to have Foobar at maximum volume, I just think it has a limited top range.

If I listen to music in Foobar, I'd normally have the volume at around 50% and wouldn't dream of turning it up much higher, there is no need. But Foobar's maximum volume really does seem quiet to me. There are other applications that go way louder, so Foobar seems a little deficient in its range, and I like to feel that I have full control over the volume rather than it being restricted by software.

There's also the matter of consistency: Normally, I have my volume level set really low, maybe about 20%, because most other software has very loud maximum volume. But then when I come into Foobar, I need to turn the volume up to something like 40% because Foobar seems much quieter.

I appreciate what you're saying about ear fatigue, but I don't listen to music very often (certainly not every single day, as you suggest). I listen to maybe about a dozen songs per week. I generally like to spend my days in silence, and I hate noise There is a big difference between spending 8 hours a day in a noisy environment, and spending maybe 10 minutes per day listening to music.

I should also clarify that I spend more time making music than listening to it, and when I've got my earbuds in, it's almost always to analyze the music, pick out the notes, chords etc. So I may have it a little louder just to hear everything more clearly. But whether I'm "trashing" the music, does not concern me.

Surely anyone who wanted a high quality, enjoyable, listening experience would not even dream of using a normalizer, as it fundamentally changes the dynamics of the music, which defeats the point?

Yes, I use ReplayGain. I can't imagine why anyone wouldn't, it is absolutely essential, surely? Who wants inconsistent track volumes?

 
SimplePortal 1.0.0 RC1 © 2008-2018