IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
ReplayGain with radio stations?
Dirki
post Jan 29 2013, 19:14
Post #1





Group: Members
Posts: 85
Joined: 31-October 09
Member No.: 74494



Does ReplayGain work with radio stations? E.g. 50 radio stations in a playlist, each station shall have the same loudness?


--------------------
Win 7, Win Vista, newest stable foobar & EAC & Cue-Tools
Go to the top of the page
+Quote Post
db1989
post Jan 29 2013, 19:20
Post #2





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Obviously not, because RG requires analysing an entire file/stream before adjusting its volume accordingly, something that is not possible with real-time streams of effectively infinite length.
Go to the top of the page
+Quote Post
Dirki
post Jan 29 2013, 19:25
Post #3





Group: Members
Posts: 85
Joined: 31-October 09
Member No.: 74494



Thank you.

Might there work another method to automatically get (nearly) the same loudness of radio stations?


--------------------
Win 7, Win Vista, newest stable foobar & EAC & Cue-Tools
Go to the top of the page
+Quote Post
db1989
post Jan 29 2013, 19:28
Post #4





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



I think you would need a dynamics compressor/limiter that additionally attempts to hover around a single loudness at all times. Unfortunately, Iím not aware of the latest solutions for this, but hopefully someone else can suggest one!
Go to the top of the page
+Quote Post
Dirki
post Jan 29 2013, 19:35
Post #5





Group: Members
Posts: 85
Joined: 31-October 09
Member No.: 74494



OK, I assume, that could or would be an add on / extension / component for foobar. I mean to have seen a compressor and / or limiter somewhere in "Components".


--------------------
Win 7, Win Vista, newest stable foobar & EAC & Cue-Tools
Go to the top of the page
+Quote Post
Kohlrabi
post Jan 29 2013, 23:15
Post #6





Group: Super Moderator
Posts: 1004
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



I think foo_dsp_effect has a compressor.


--------------------
Audiophiles live in constant fear of jitter.
Go to the top of the page
+Quote Post
Dirki
post Jan 30 2013, 00:33
Post #7





Group: Members
Posts: 85
Joined: 31-October 09
Member No.: 74494



Many thanks for the link, Kohlrabi.

In "Playback", "DSP Manager" I can find a Dynamics Compressor and a EBU R128 Compressor, so what can I do now with them?



--------------------
Win 7, Win Vista, newest stable foobar & EAC & Cue-Tools
Go to the top of the page
+Quote Post
Dynamic
post Jan 31 2013, 20:02
Post #8





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



I was hoping to save the streams in a playlist file and somehow apply ReplayGain manually to that, as many stations would have a fairly consistent volume level. That didn't work, which is a shame, and there's not a database of RG values stored in fb2k these days, as far as I'm aware.

I tried the EBU R128 Compressor on a couple of streams and first of all I thought it made no difference, which actually means my personal Pre-Amp was just about right, so here's your first option!

OPTION 1
I've set my ReplayGain Pre-Amp to 0.0 dB and Apply Album Gain, and for sources without Replay Gain (which means radio streams only, most of the time), I have it set to -7.5 dB.

This method ensures no additional dynamic range compression is applied and gets the volume about the same as my music collection. However, unusually quiet or loud stations would still seem out-of-whack.

OPTION 2
The EBU R128 Compressor (from the R128Norm1.11 DSP) goes into your DSP chain and will automatically match to the ReplayGain standard 89 dB SPL using the R-128 algorithm and a reasonable look-ahead.

I played a stream from http://icecast-beta.timlradio.co.uk:8000/ac96.opus (not all Absolute Radio Opus streams are always on air, however) which was fairly loud and that tamed it by about 7.5 dB and it sounded fine, as did http://radioserver1.delfa.net/64.opus (which seems to be a reliably available stream)

(Actually, I didn't notice the DSP working at first when I put it in and removed it from my DSP list until I set my Pre-Amp back to 0.0 dB or down to -20.0 dB, when it became obvious)


Beyond those options, the standard compressor (at default setttings) isn't so much of an automatic volume control as Option 2 - e.g. if I set my PreAmp to -20 or +11 dB, it produces quite different volume, whereas EBU R128 Compressor does a nice job of maintaining consistency (without overdoing it when volume fades below the 'gate' level)

The Smoothest Jazz streams at http://radioserver1.delfa.net/64.opus (and the barely distinguishable http://radioserver1.delfa.net/256.opus at four-times the bitrate) seem to maintain a nice dynamic range and the EBU R128 Norm DSP doesn't noticeably affect it.

In fact, it does such a subtle job, it might be my ideal choice for pre-processing background music to a consistent volume without introducing so many steps in the process (I've used vlevel DSP with ReplayGain post-processing before, and achieved easier consistency with just ToneBoosters TB Compressor more recently, but this seems to be aiming at exactly my type of use case - barely affect the sound quality but keep the volume nicely consistent).
Go to the top of the page
+Quote Post
Dirki
post Feb 4 2013, 14:45
Post #9





Group: Members
Posts: 85
Joined: 31-October 09
Member No.: 74494



Many thanks for testing and explaining.

So, all I have to do is to use option 2 - as it is the better one - and to just add the EBU R128 Compressor to "Active DSPs" and since there is not anything to adjust, that it was. It seems to work on my system, also as far as I can see, like you say, great, and so easily done.

I see, the "Dynamics Compressor" takes effect instantly after adding, also.

The Smooth Jazz station is very good, I was looking for exactly such music stations. Where did you find it?

Many thanks again.


--------------------
Win 7, Win Vista, newest stable foobar & EAC & Cue-Tools
Go to the top of the page
+Quote Post
2Bdecided
post Feb 4 2013, 16:26
Post #10


ReplayGain developer


Group: Developer
Posts: 5062
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



Thanks for those hints Dynamic. I was using your option 1, but option 2 looks more family-safe. So is vlevel, but I don't always want that.

EDIT: I think I can hear the effect of the EBU R128 Compressor kicking in sometimes. Also, it delays the start of playback for radio stations (presumably it is buffering several seconds, which the radio stream delivers in something like real time).

Cheers,
David.

This post has been edited by 2Bdecided: Feb 4 2013, 17:20
Go to the top of the page
+Quote Post
Dynamic
post Feb 8 2013, 11:32
Post #11





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



QUOTE (Dirki @ Feb 4 2013, 13:45) *
The Smooth Jazz station is very good, I was looking for exactly such music stations. Where did you find it?


Great isn't it. I did notice a smooth jazz style christmas song in there last week, though! Someone else mentioned it in a thread about converting a captured stream into a valid Ogg/Opus file with correct duration and starting time display. I then traced the URL through google found the Icecast Directory at http://dir.xiph.org/, which mentions Opus64, Opus256 and MP3192CBR versions of the station (note that Opus isn't specifically mentioned in the Icecast Directory's codec options, but it uses an Ogg container, so comes up as Vorbis). I hadn't really noticed the Icecast Directory before, but it's good.

QUOTE (2Bdecided @ Feb 4 2013, 15:26) *
Thanks for those hints Dynamic. I was using your option 1, but option 2 looks more family-safe. So is vlevel, but I don't always want that.

EDIT: I think I can hear the effect of the EBU R128 Compressor kicking in sometimes. Also, it delays the start of playback for radio stations (presumably it is buffering several seconds, which the radio stream delivers in something like real time).


Yup, I noticed the delay when applying it, especially when playing the very immediate Opus streams, so it must have a reasonable look-ahead.

I didn't hear many unwanted artifacts of the EBU R128 Compressor. I think I've heard subtle compression effects too, though - mainly just a little noise modulation when moving from quiet intros or moving into quiet fade outs that originated from low SNR analogue media but used a wide dynamic range. So far I've not noticed any pumping, but it did a FAR better job than vlevel at the intro of Since You Been Gone by Rainbow in avoiding a noticeable dip on the guitar part as the look ahead sees the full band is about to start much louder. For me this beats vlevel.

In my experience of making quiet background music since about 2007, vlevel alone would just occasionally get it way wrong for volume - my distinct memory is that Robbie Williams' Millennium in particular was far too loud after just vlevel, and a couple of songs got lost slightly so I switched to using vlevel on conversion to an intermediate FLAC then ReplayGain scanned that FLAC (original ReplayGain 1 algorithm - that has been invaluable to me over the years, David!) and applied that gain before sending it to the helix MP3 encoder (somewhat quicker than older LAME versions for a large batch job with no gapless support and matching quality at about 131kbps). So clearly, any loudness-contour aware compressor (Fletcher-Munson effect or similar) aiming for consistent loudness should do better. The TB Compressor (from Toneboosters) also seems to do better than vlevel with the settings I adopted (and I left the top end of that fairly uncompressed for clean transients).

On a fairly quick appraisal EBU R128 Compressor seemed maintain consistent medium and long term volume, but has plenty of headroom and leaves transients nice and crisp* unlike many fast compressor/limiters that can deaden a lot of the drums and sharp percussion on older (non clippressed) material (which is why I went for vlevel originally as a simple gain rider with modest peak limiting).

(* I should say I didn't give it full detailed headphone listening or ABX anything - I was mainly interested in low and medium volume performance and ensuring it didn't sound lifeless)

When giving it the once over, apart from those radio streams, I definitely jumped straight for a few tracks I knew to have been extreme cases. Since You Been Gone which had been poor on vlevel was well handled, Aretha Franklin's beautiful high dynamic range cover of Tracks Of My Tears from Aretha Arrives was also brought out nicely without getting lost in the first half when I turned down the listening volume (vlevel also did very well when I originally used it), and I'm pretty sure I ran it past Millennium to ensure it was properly loudness-aware, and it didn't jump out as too loud. (I probably had Album Gain and -7.5dB preamp for everything non-RG turned on the whole time I put it through its paces, but my selection included quiet album tracks brought up and loud ones brought down). The main thing I didn't really test was modern clippressed ultraloud tunes played without any kind of negative gain applied before it reached the EBU R128 Compressor.

I'm pretty happy with it for quiet background music purposes and moderately loud listening where there's noise around and I'll forego the full dynamic range.

I use different Windows User Accounts with different audio settings (where they're independently adjustable) and different fb2k settings (e.g. -3 dB RG pre-amp to give a bit more headroom for dynamic effects on the User Account I use for editing backing tracks), so for one of these where I mostly work and listen to music casually it might make sense to run the EBU R128 Compressor most of the time, if I start using radio streams with disparate volume targets quite often.

This post has been edited by Dynamic: Feb 8 2013, 11:35
Go to the top of the page
+Quote Post
Dynamic
post Feb 8 2013, 15:20
Post #12





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



Update: Just tried EBU R128 Compressor on a live digital mixer direct to USB recording from the other night, and there were a couple of areas where its effects were noticeable - especially as the plain instrumental sections in Wichita Lineman came in. We had the vocals rather prominent so the backing rose fairly noticeably when they came to an end and there was no pause between beats there to disguise the gain ramp. There were also some rather over-prominent intros which sounded a bit odd to me being so familiar with their dynamics.

Then again, for a quick quality check, verification of very low noise levels and to see whether crowd applause and banter were picked up adequately to survive an edit it was very helpful and its effect was largely transparent (in the loose non TOS#8 sense that any AGC or Compressor can be transparent and with the few exceptions noted). It's also useful for skipping through rapidly and casually noting down appropriate cue points for later editing after the entire fade out without listening at high volume.
Go to the top of the page
+Quote Post
2Bdecided
post Feb 8 2013, 18:04
Post #13


ReplayGain developer


Group: Developer
Posts: 5062
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



Thanks for sharing your experience Dynamic.

I heard vlevel let something through too loud, but assumed that was because I'd turned the strength down to 0.6, and then 0.7, to try to tame it a bit. It is helpful to hear from someone who has listened for longer and tried harder with it!

Cheers,
David.
Go to the top of the page
+Quote Post
mobyduck
post Feb 9 2013, 10:24
Post #14





Group: Members
Posts: 573
Joined: 24-April 03
From: Italy
Member No.: 6159



QUOTE (Dirki @ Feb 4 2013, 06:45) *
The Smooth Jazz station is very good, I was looking for exactly such music stations.
You might want to check Sky.fm.

Alessandro
Go to the top of the page
+Quote Post
Dynamic
post Mar 4 2013, 19:38
Post #15





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



I thought it worth quoting the following post in this thread too (the post itself references this thread), as it's probably to best solution for automatically using R128 Compressor only for radio that I've seen:

With thanks to WilB for the useful post quoted below
and massive kudos to popatr for the foo_dynamicdsp plugin (copy the dll from the Release folder in the zip into your fb2k components) that lets you specify using titleformatting syntax which chain of additional DSPs you'd like to use (your syntax should return the text of the chain's name or a null string for no chain).

QUOTE (WilB @ Mar 1 2013, 23:38) *
Since my media files are already replay gained, I find this plug-in useful for loading the EBU R128 Compressor and applying replay gain on the fly selectively for radio streams so that all radio streams and media library tracks are of similar sound level.

The EBU R128 Compressor automatically matches to the ReplayGain standard 89 dB using the standard R-128 algorithm and a reasonable look-ahead. I use a titleformat script of $if($strstr(%path%,'://'),Radio,). The Radio chain contains the EBU R128 Compressor. See also http://www.hydrogenaudio.org/forums/index....=0&p=823073


I just tested WilB's method and was able to adjust the Preferences/Playback pre-amp for non-ReplayGained sources over a 40 dB range (using Apply and waiting for the buffer) with no effect on the output level exactly as

It's quite possible to be more specific with the titleformatting string if your situation is different (e.g. if you access ReplayGained files via a full URL containing :// you could instead search to see if either of the ReplayGain gain tags is present and otherwise use the Radio DSP chain)

I thought I could improve matters further, so I tested the following as a Custom column in playlist view, and it correctly identified my main library tracks as ReplayGain, but put the text R128Compressor next to all tracks without ReplayGain (including the Windows 7 sample tracks in C:\Users\Public\Music\Sample Music), plus Radio URLs and a couple of test files)
$if($or($strstr(%replaygain_album_gain%,' dB'),$strstr(%replaygain_track_gain%,' dB')),ReplayGain,R128Compressor)

This did catch files with only a track gain and no album gain too.

Thus, I went ahead and tested my version in Dynamic DSP:
CODE
$if($or($strstr(%replaygain_album_gain%,' dB'),$strstr(%replaygain_track_gain%,' dB')),,R128Comp)


I then set up the Chain called R128Comp to contain just the EBU R128 Compressor DSP from mudlord's foo_dsp_effects bundle kode54.

This screenshot shows the dialogue boxes and still shows my test column indicating whether ReplayGain or the R128 Compressor should be used with each file.



The only very minor downside is that where the EBU_R128 compressor is used it adds a few seconds look-ahead buffering time before playing the Opus format radio stream which is otherwise low latency and barely buffered at all. On file-based playback without RG

I don't think there's any reason you couldn't use multiple instances and multiple chains to choose numerous effects where it makes more sense than building numerous similar but different chains. In one or two instances, I might in fact identify some hard-panned stereo files with a comment in their tags and apply some crossfeed DSP to those alone, or conversely detect the word binaural and bypass the crossfeed when I wish to use it by default.

This post has been edited by db1989: Mar 6 2013, 14:36
Reason for edit: as per post #19
Go to the top of the page
+Quote Post
WilB
post Mar 5 2013, 01:09
Post #16





Group: Members
Posts: 295
Joined: 20-July 06
Member No.: 33113



Was there any reason for using the EBU R128 Compressor DSP from mudlord's foo_dsp_effects bundle as opposed to the kode54 version ( http://www.foobar2000.org/components/view/foo_r128norm ) - or are they the same?

This post has been edited by WilB: Mar 5 2013, 01:11
Go to the top of the page
+Quote Post
kode54
post Mar 5 2013, 02:12
Post #17





Group: Admin
Posts: 4579
Joined: 15-December 02
Member No.: 4082



Completely different compressors. The compressor in foo_dsp_effect is not even based on EBU R-128. It is a pure dynamics compressor.

foo_r128norm, on the other hand, is more of a short range R128 gain filter, scanning 10 seconds ahead and always buffering at least 4 seconds of sample data, to attempt to be the closest to using the player's own ReplayGain scanner on a full track.
Go to the top of the page
+Quote Post
WilB
post Mar 5 2013, 13:57
Post #18





Group: Members
Posts: 295
Joined: 20-July 06
Member No.: 33113



@kode54. Thanks for the clarification. I am getting on very well using your plug-in with radio streams. I wondered if you had considered making the plug-in inert if a track already has replay gain, i.e. do absolutely nothing with such tracks. Currently it does seem to process tracks with replay gain, e.g. changing the preamp doesn't alter the volume if r128norm is present and so there appears to be a double effect due to the intrinsic replay gain and the r128norm plug-in. I think making the plug-in inactive for tracks with replay gain may make the plug-in more generally useful because it can then be left in the dsp chain and automatically kick in with radio streams or tracks lacking replay gain (assuming there are no unwanted side effects).

This post has been edited by WilB: Mar 5 2013, 14:09
Go to the top of the page
+Quote Post
Dynamic
post Mar 6 2013, 03:32
Post #19





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



Oops!

Thanks, WilB, for asking about kode54's plugin and making me check my memory. Actually, having installed that and mudlord's DSP_effect bundle about the same time, I'd forgotten where I obtained the EBU R128 Compressor - in the DSP list it's not so obvious which Component plugin they're from and I simply misremembered. Actually, ealier in this very thread I mentioned the right one.

Actually, as you can see from the screenshot, I WAS using kode54's excellent EBU R128 Compressor - thank you kode54 - not the standard compressor from mudlord's bundle. The R128 Compressor has the unique advantage of matching perceptual loudness with ReplayGain.

I don't think I can edit my previous post, near the screenshot where I mentioned the wrong Component.
Go to the top of the page
+Quote Post
kode54
post Mar 6 2013, 17:36
Post #20





Group: Admin
Posts: 4579
Joined: 15-December 02
Member No.: 4082



That Dynamic DSP component should work just fine. The only recommendation I can give is that when you use an instance of it, you place the dynamic DSP which hosts it at the very top of the DSP chain. That way, when it enables or disables itself, it won't be forcing any other DSPs to flush themselves.

That's the thing about requiring track change markers from a DSP component. It forces the core to flush every track completely before sending the track change notification. If you have any resampler or similar DSP filters before your notified DSP, they will be forced to flush their output first, which could create noticeable gaps in the encoding.

Of course, I guess if you're going to be using a DSP like this with its approximation of track gain on every file, gaplessness won't be much of a concern.
Go to the top of the page
+Quote Post
Dynamic
post Mar 7 2013, 11:28
Post #21





Group: Members
Posts: 796
Joined: 17-September 06
Member No.: 35307



Good point, and thanks for that. I've now put the Dynamic DSP which may or may not call the EBU R128 Compressor first in my main chain, and my resampler second in the chain.

As it happens, the resampler as I've set it usually does nothing (under my normal Windows User Account it's set to only resample rates that are unsupported on my DisplayPort->HDMI connection to my LG TV to 48000) so won't resample 44.1 or 48kHz anyhow, and those two rates account for the vast majority of my tracks, whether commercial, self-recorded or streamed.

For my gapless collection, it's all ReplayGained, so that should play fine and radio streams are continuous and gapless anyway, but I tested it with a mixed playlist of ReplayGain and non-ReplayGain tracks alternating, followed by the Smoothest Jazz streaming radio URL, and it seems all tracks ran continuously without pause (even the Radio stream at the end of the playlist buffered enough into the EBU R128 Compressor to start immediately the previous track ended).
Go to the top of the page
+Quote Post
Rescator
post Aug 11 2013, 19:06
Post #22





Group: Members
Posts: 73
Joined: 13-January 09
From: Trondheim
Member No.: 65515



Kind of digging up an older thread here but...this was relevant.

Yes it is possible to have radio stations normalized.
http://www.hydrogenaudio.org/forums/index....howtopic=102184


--------------------
"Normality exist in the minds of others, not mine!" - Rescator
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th July 2014 - 17:49