View Full Version : ffdshow and Dynamic range compression
Wile-E-Coyote
26th June 2013, 21:22
This has been bothering me ever since I discovered this setting so I have to ask.
In the "decoder options" tab you can activate the "Dynamic Range compression" with a slider from 0 to 100%
From my understanding of DRC, it serves the purpose of reducing the difference in loudness between quiet and loud parts of a track, which is something I sorely needs since professional sound mixers love to make dialogues very quiet and action scenes very loud.
However I've tried activating and deactivating it (on DVDs and Blu-rays so sound should be AC3) and heard no difference in loudness. Also what is the slider supposed to do? Is 0% the equivalent of OFF and 100% like Fully ON?
I've searched the net for answers but couldn't find any so please guys, enlighten me.
turbojet
2nd July 2013, 05:52
It's never had an effect for me in ffdshow or mpc* either. Instead you can use volume>normalize and check regain volume. Latest mpc-hc has the same sort of normalize but I couldn't figure out how to boost the volume much. mpc-be has the old system which takes longer to regain but volume can be boosted. Another option if you have windows 7/8 and a supported soundcard you can enable loudness equalization (http://www.trishtech.com/win7/enable_loudness_equalization_in_windows_7.php) which affects all audio but does a great job of keeping sounds within a good range.
leeperry
2nd July 2013, 13:44
you'll be better off using a winamp2/VST plugin in ffdshow for proper dynamics compression, and if you're downmixing to stereo an elaborated mixing matrix will make things a lot more bearable(especially with headphones).
kopija
2nd July 2013, 19:36
Hi guys,
is there any way to use DRC in bitstreaming scenario?
Thanks!
clsid
2nd July 2013, 19:47
The DRC option only has effect if the audio stream contains DRC information. It seems that is rarely the case.
You can find a normalize option on the Volume page in ffdshow audio decoder. That will boost the volume and compress dynamic range. MPC-HC offers a similar option (which has recently been improved to work more similar to ffdshow). Windows Vista/7/8 also offers an option as mentioned above by turbojet.
When bitstreaming, the audio data is not modified in any way. So if you need DRC-like functionality in that case, your receiver must provide it.
Wile-E-Coyote
8th July 2013, 10:27
Another option if you have windows 7/8 and a supported soundcard you can enable loudness equalization (http://www.trishtech.com/win7/enable_loudness_equalization_in_windows_7.php) which affects all audio but does a great job of keeping sounds within a good range.
Thats one of the best options I've found, but it's still not enough for my taste.
you'll be better off using a winamp2/VST plugin in ffdshow for proper dynamics compression, and if you're downmixing to stereo an elaborated mixing matrix will make things a lot more bearable(especially with headphones).
I tried that. Problem is when used in ffdshow, winamp plugins aren't very easy to configure. At least the ones I've tried.
The DRC option only has effect if the audio stream contains DRC information. It seems that is rarely the case.
Well that explains a lot.
You can find a normalize option on the Volume page in ffdshow audio decoder. That will boost the volume and compress dynamic range.
Really? Whenever I use that it does boost the volume indeed, but doesn't compress it at all unless unless I tick "regain volume". And even that doesn't boost quiet parts enough.
Anyway thank you all for your answers. I managed to find a solution that satisfied me by using a third-party app called Breakaway Audio Enhancer. It's actually a multi-band compressor and I found it does exactly when I've been looking for, problem is it's not free. So now I'm trying to find a similar software or plugin that can be used with MPC-HC or ffdshow.
bugmen0t
8th July 2013, 16:01
I managed to find a solution that satisfied me by using a third-party app called Breakaway Audio Enhancer. It's actually a multi-band compressor and I found it does exactly when I've been looking for, problem is it's not free. So now I'm trying to find a similar software or plugin that can be used with MPC-HC or ffdshow.
You could use the Winamp version of Stereo Tool (http://www.stereotool.com/download/) with ffdshow. It's free unless you need some specific features mainly intended for FM radio stations. I don't like any of the presets, though.
Villa Palmar Cabo Timeshare (http://www.myvacationrentals.net/smaller-timeshare-companies/)
filler56789
8th July 2013, 21:24
What about AC3Filter? :confused:
Have you already tested it, and concluded "it sucks too"? :)
http://www.ac3filter.net/wiki/Using_dynamic_range_compression
http://www.ac3filter.net/wiki/Loudness_and_dynamic_range
turbojet
8th July 2013, 22:13
Thats one of the best options I've found, but it's still not enough for my taste.
What were the other compressors you found just as good?
This is how I rank them:
Tier 1 (no noticeable issues)
W7 loudness equalization with either immediate checked or shortest release
Tier 2 (noticeable fluctuations but tolerable if LEQ isn't available/wanted)
MPC-HC
FFDshow
PotPlayer
Tier 3 (too many fluctuations to use/recommend)
MPC-BE
ReClock
AC3Filter
Some WinAmp DSP's (tested a few but don't remember the names, Stereo Tool was one)
Good dynamic compression must be very difficult to achieve or no FOSS devs care to work on it.
bugmen0t
9th July 2013, 07:37
If he wants a free version of Breakaway Enhancer, i.e. a broadcast tool including a multiband compressor which is actually used for radio and TV, Stereo Tool is the tool of choice. It is certainly able to do the job, however as said above, all the presets overcompress because they are made for agressive FM broadcast which totally sucks. One probably needs an audio engineer spending a few hours with it to come up with some nice movie settings.
Some software which is probably less known and I couldn't test:
CSharp (http://profoundsoundaudio.com/products.html) (only works with win7 but I'm on win8; support told me there'll be a new product for win8 some months ago)
RAC (http://mindbytez.com/rac/index.html) (winamp plugin I couldn't get working with ffdshow)
I really read a lot about loudness the last few months and it is a tough problem, both measuring it the way humans perceive it and controlling it without causing audible artifacts. There's a lot of broadcast hardware dealing with it but unfortunately very few software.
Another complication than fluctuation I find quite disturbing is the change of spectrum the compressors cause. Dynamic equalization would be necessary to compensate for that but I don't know any free tool doing that. However multiband compression can achieve something similar.
So, if anyone knows a good loudness control software, preferable made with movies in mind, please post about it!
Villa Arco Timeshare (http://www.myvacationrentals.net/time-share-at-villa-del-arco-cabo/)
Wile-E-Coyote
9th July 2013, 13:51
What were the other compressors you found just as good?
Sorry I don't understand your question. What I meant is that W7 loudness equalization (not sure what the immediate mode does) is certainly one of the bes options because it's free and does a decent job. However the difference between quiet and loud can still be too high.
Sorry for the noobish question but what is LEQ?[/QUOTE]
If he wants a free version of Breakaway Enhancer, i.e. a broadcast tool including a multiband compressor which is actually used for radio and TV, Stereo Tool is the tool of choice. It is certainly able to do the job, however as said above, all the presets overcompress because they are made for agressive FM broadcast which totally sucks. One probably needs an audio engineer spending a few hours with it to come up with some nice movie settings.
The thing about broadcast sound is that no matter how much noise there is around you, provided the volume of the movie/music is loud enough you will be able to hear EVERYTHING, which is not the case on a DVD / Bluray.
Now I know that compressing the sound amounts to deforming it, but if it means not having to constantly turn the volume up or down then I'm all for it.
Wile-E-Coyote
9th July 2013, 21:03
What about AC3Filter? :confused:
Have you already tested it, and concluded "it sucks too"? :)
http://www.ac3filter.net/wiki/Using_dynamic_range_compression
http://www.ac3filter.net/wiki/Loudness_and_dynamic_range
Yes I have, and I find it yields the same result as ffdshow. I don't remember saying anything sucked anyway.
turbojet
11th July 2013, 00:16
If he wants a free version of Breakaway Enhancer, i.e. a broadcast tool including a multiband compressor which is actually used for radio and TV, Stereo Tool is the tool of choice. It is certainly able to do the job, however as said above, all the presets overcompress because they are made for agressive FM broadcast which totally sucks. One probably needs an audio engineer spending a few hours with it to come up with some nice movie settings.
Some software which is probably less known and I couldn't test:
CSharp (http://profoundsoundaudio.com/products.html) (only works with win7 but I'm on win8; support told me there'll be a new product for win8 some months ago)
RAC (http://mindbytez.com/rac/index.html) (winamp plugin I couldn't get working with ffdshow)
I really read a lot about loudness the last few months and it is a tough problem, both measuring it the way humans perceive it and controlling it without causing audible artifacts. There's a lot of broadcast hardware dealing with it but unfortunately very few software.
Another complication than fluctuation I find quite disturbing is the change of spectrum the compressors cause. Dynamic equalization would be necessary to compensate for that but I don't know any free tool doing that. However multiband compression can achieve something similar.
Having not tested winamp dsp's for a couple years now, I decided to try the latest Stereo Tool and couldn't achieve understandable dialect after enabling AGC and tweaking other settings for about 20 minutes. Did you get anywhere with it? I don't remember having this sort of problem with the older version of Stereo Tool but know it was either ineffective or had a lot of pumping as all the dsp's I tested. RAC didn't work here either, there are some other dsp's I tried with short names like *AC but not worth finding again or suggesting.
I may try CSharp at some point, thanks for the link but really content on W7 LEQ.
Sorry I don't understand your question. What I meant is that W7 loudness equalization (not sure what the immediate mode does) is certainly one of the bes options because it's free and does a decent job. However the difference between quiet and loud can still be too high.
Sorry for the noobish question but what is LEQ?
When you said 'one of the best' I took that as others were better or just as good but must have misunderstood. Immediate Mode if it's available makes a postitive difference, eliminates the rare pumping. Otherwise you may have a configuration that leads to a slider to change release, moving that all the way to short also eliminates pumping.
LEQ is short for Loudness Equalization.
mindbomb
11th July 2013, 00:39
I'll add that for asus sound cards, "smart volume normalization" didn't do a great job imo.
bugmen0t
12th July 2013, 12:21
@turbojet
The 'usual' chain they recommend in the stuff I've read is: slow AGC -> equalizer -> multiband compression -> multiband limiting (most seem to use 5 bands). Of course the multiband thresholds, speeds, ratios and makeup gains need to be set differently for each band. As said above my main problem is not to completely screw up the spectral balance of the original. But then again downmixing to stereo did that already. :(
The win7/8 integrated equal loudness correction I can hear pumping/breathing and changing spectral balance, too. Also you cannot turn it on for movies only and I like to use an equalizer which will possibly disturb the leq.
The only thing I consider OK for now is Dolby Volume but there's no software implementation of it, right?
Villa Palmar Cabos Timeshare (http://www.myvacationrentals.net/top-10-best-romantic-destinations/)
turbojet
15th July 2013, 23:00
What does slow AGC mean? I tried the other things with stereo tool with no luck.
Are you using immediate or shortest release with leq? It really makes a difference, if you set to longest release there's more pumping then the tier 2 options above. LEQ affecting all audio I prefer but can understand others not liking it.
I don't know of any dolby volume software. DTS has a volume normalizing setting in their srs drivers but it didn't work very well on my laptop, although it did provide a large volume boost which was nice for the 4w speakers but lots of pumping and affects overall audio like leq.
edit: nevermind srs drivers don't have a normalize option but do boost all volume.
Jok20
19th July 2013, 12:24
LoudMax Plugin (http://www.loudmax.blogspot.ru/2013/01/loudmax-plugin-v112-released.html)
Wile-E-Coyote
20th July 2013, 17:27
LoudMax Plugin (http://www.loudmax.blogspot.ru/2013/01/loudmax-plugin-v112-released.html)
I can't make this work even in Winamp. Much less in ffdshow.
turbojet
20th July 2013, 21:06
LoudMax does a good job of boosting the audio without clipping but it doesn't do much with dynamic range except maybe expanding it a bit. Background noise drowned out the dialogue in the clip I tried it on.
The problem I was having with stereo tool was 32 bit enabled in ffdshow. Now that it's working correctly, the 'watch a movie' preset works pretty well by itself and comparable to loudness equalization with more depth. Unfortunately it doesn't work well with leq, there's clipping and near inaudible noises become a significant part of the audio. The clipping can probably be handled with the declipper but not sure about the other issue, will have to try tweaking stereo tool. I'm just afraid it could take a lot of time without accomplishing much and trying to prevent those situations. I'm far from an audiophile and most stereo tool options are foreign to me.
I use leq often outside of a media player otherwise stereo tool in the media player would be the best option for me so far. If only there was a way to use it on all audio.
leeperry
21st July 2013, 17:55
iZotope OzoneMP (http://www.winamp.com/plugin/izotope-ozone/79374) works perfectly in ffdshow and is a really great sounding compressor :cool:
it might even support 32fp in ffdshow, worth a try(lower the volume of your amp, just in case it doesn't ^^)
bugmen0t
22nd July 2013, 21:46
What does slow AGC mean?
Stereo Tools AGC gets linearly faster if the volume gets further away from the target. I think 10 for the downspeed is way too much but that also depends on other settings one makes, e.g. in the multiband section. It was considered to add a slow window, let's see what the future brings.
The problem I was having with stereo tool was 32 bit enabled in ffdshow.
ST handles 32 bit well you just need to make sure it gets integers not floats since it isn't able to recognize the difference itself. (Was said to me this were a general winamp plugin restriction.)
Now that it's working correctly, the 'watch a movie' preset works pretty well by itself and comparable to loudness equalization with more depth.
That's a fast, low quality preset without AGC and using the old multiband. ST can do much better now. Sadly no one has made a new movie preset yet. :(
Unfortunately it doesn't work well with leq, there's clipping and near inaudible noises become a significant part of the audio.
Why do you want to use them both?
Note that as far as I know the Windows builtin leq means to get about constant volume as humans perceive it. Therefore they use the terms loudness and equal.
However this is different from equal loudness curves correction, i.e. compensating for the difference of humans hearing frequency response, like e.g. Audyssey Dynamic EQ does.
But ST can do essentially both. As I said above it's difficult for me to set that up correctly what is exactly what I'm trying to do.
I can't make this work even in Winamp. Much less in ffdshow.
LoudMax works fine for me in ffdshow. It even handles 5.1 with taking care that a later stereo downmix won't clip.
However it only compensates for 30 dB which is too little for movies and I don't like the color it gives to the sound.
iZotope OzoneMP (http://www.winamp.com/plugin/izotope-ozone/79374) works perfectly in ffdshow and is a really great sounding compressor :cool:
it might even support 32fp in ffdshow, worth a try(lower the volume of your amp, just in case it doesn't ^^)
Is this very old stuff free?
turbojet
23rd July 2013, 00:07
Stereo Tools AGC gets linearly faster if the volume gets further away from the target. I think 10 for the downspeed is way too much but that also depends on other settings one makes, e.g. in the multiband section. It was considered to add a slow window, let's see what the future brings.
Wouldn't this slowdown either clip or very low audio, depending on which way it's going? MPC-HC had a really slow increase with quick decrease until recently, mpc-be still has it and it's not very good. The increase has been sped up a lot in the newer mpc-hc which makes a huge difference but still has some issues. What's really needed is a read ahead.
ST handles 32 bit well you just need to make sure it gets integers not floats since it isn't able to recognize the difference itself. (Was said to me this were a general winamp plugin restriction.)
It doesn't handle ffdshow's 32 bit, which made me think it was broken.
That's a fast, low quality preset without AGC and using the old multiband. ST can do much better now. Sadly no one has made a new movie preset yet. :(
Enabling AGC came along with a lot of audio pumping, didn't tweak a lot but couldn't improve it and there wasn't a noticable improvement to be heard but LEQ enabled may have had something to do with it. Here's hoping for an updated preset.
Why do you want to use them both?
Note that as far as I know the Windows builtin leq means to get about constant volume as humans perceive it. Therefore they use the terms loudness and equal.
However this is different from equal loudness curves correction, i.e. compensating for the difference of humans hearing frequency response, like e.g. Audyssey Dynamic EQ does.
But ST can do essentially both. As I said above it's difficult for me to set that up correctly what is exactly what I'm trying to do.
LEQ mainly for internet and music players. Which is ~60% usage on this computer. ST for the added depth. If ST could work on all audio it would be ideal. It's really a hassle disabling LEQ up to 10x or so a day.
Mikey2
7th August 2013, 22:34
I really love AC3Filter (http://www.ac3filter.net/wiki/AC3Filter) for DRC. (Don't let the AC3 in the name fool you, it works for almost every format, including PCM and DTS.) After looking through practically every major audio decoder out there, I still find this one to be the best for this.
The options can be a little daunting (look at their Help Page (http://www.ac3filter.net/wiki/Loudness_and_dynamic_range) on Loudness and Dynamic range and its implementation in AC3Filter!) ...But there are simple ways to configure it.
I do not work for them nor know anyone there, but I have used it for a while now, so feel-free to ask me anything about configuring it.
Good Luck!
cafevincent
26th November 2017, 23:07
I hope I'm not out of line for resurrecting this thread since it's direly needed. I have been struggling with this very problem for over 15 years now and would love a proper solution. It's still completely impossible to watch movies at night.
I would settle for a solution where I need to extract the audio track, process it and mux it back (as long as it's batch scriptable).
zz2
27th April 2018, 13:40
I hope I'm not out of line for resurrecting this thread since it's direly needed. I have been struggling with this very problem for over 15 years now and would love a proper solution. It's still completely impossible to watch movies at night.
I would settle for a solution where I need to extract the audio track, process it and mux it back (as long as it's batch scriptable).
Unfortunately there still no proper solution for this in 2018.
"Loudness Equalization" enhancement in Windows 10 has far too aggressive auto gain riding for my taste. Explosions sound unsatisfying and whisper sometimes feel louder than explosions.
I use DRC settings inside AC3Filter. I have AC3Filter set as preferred audio decoder for all supported codecs inside PotPlayer (Filter Management -> Audio Decoder). Unfortunately it doesn't work for everything and sometimes it breaks pitch correction when changing playback speed. Also it seems that development of AC3Filter has ceased.
Another option would be compressor inside VLC.
I really hope someday we will see open source multiband compressor and a limiter. As almost every open source loudness equalizing solution uses only some variation of auto gain.
richardpl
27th April 2018, 14:26
Check loudnorm, dynaudnorm, acompressor, compand, mcompand, alimiter in FFmpeg.
zz2
27th April 2018, 15:46
Check loudnorm, dynaudnorm, acompressor, compand, mcompand, alimiter in FFmpeg.
Is this only for encoding or can it be also used for playback?
richardpl
27th April 2018, 16:32
Yes, mpv uses it for playback too.
zz2
27th April 2018, 16:44
Thanks! I'll check it out.
smok3
27th April 2018, 19:16
I have this in my mpv input.conf
# enable/disable loudnorm (r128) audio filter
F1 cycle-values af "" "lavfi=[loudnorm=LRA=10:I=-17]" "lavfi=[loudnorm=LRA=5:I=-17]"
and this in my mpv.conf
af=lavfi=[loudnorm=LRA=5:I=-17]
xabregas
5th May 2018, 19:33
So many options for night mode now. No need to reencode audio!!
- mpv has lots of compressors editable to your needs. (acompressor is the best)
- Stereo tool is not really intended for movies but gets the job done. However, given the cpu used it might not be suitable for mini HTPC for example...
- Reclock has a compressor with 3 modes. Medium is spot on for onboard soundcards!!!
- Kodi volume amplification when used will compress sound!!!
- Realtek modded drivers with creative software MB5!!! It has one of the best compressors and plus 3 modes. And it has one of the best crossover frequency cut-off!!!
- VLC compressor gets the job done if you know what every setting means. They have them explained in the manual...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.