Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum Microphone recording -> range compression
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 20th May 2015, 17:50 #1  |  Link Rash Registered User     Join Date: Aug 2002 Posts: 403 Microphone recording -> range compression Hello guys. I have been reading the other topics here related to dynamic range compression and automatic level control, specially tebasuna51's amazing experience with this. I just would like to get some more tips if possible for my very specific application. I have audio files recorded from a microphone that is placed on a fixed location in a room. People talk in the room from different distances to the microphone (like a meeting) and I would like to make them all sound at relatively the same volume. I can only use ffmpeg and whatever tools ffmpeg have so I was playing with the compand's filter. However, I am not exactly sure how the transfer points work. Do they apply a relative gain on their range or is it a fixed gain? Let me explain. If I set -70,-35, I know it will apply a gain of 35dB to -70 samples and make them sound like -35dB. But what about -65? Will it also apply a 35dB gain making it sound like -30 or does it apply a relative gain? So at a 1:2 ratio the -65 would sound like -32.5db? -75,-35,-20,-20 is: -75 | -35 -55 | -25 -45 | -15 -25 | 0 (clipping) -20 | -20 -15 | -15 0 | 0 Or -75,-35,-20,-20 is: -75 | -35 -55 | -27.5 -45 | -22.5 -25 | -12.5 -20 | -20 -15 | -15 0 | 0 I have been playing with compand's points, but I couldn't come up with good values myself. Moreover, do I need to know exactly the volume ranges of each person in the room to make good guesses on transfer points? Or do you think it is possible to come up with a transfer function that works for all my recordings? Thank you!
 20th May 2015, 20:20 #2  |  Link hello_hello Registered User   Join Date: Mar 2011 Posts: 4,852 You're really restricted to ffmpeg? It'd be a pity if you couldn't at least try Levelator There's several utilities for levelling out the volume. There's a thread dedicated to one here and within it are a few links to similar utilities.
21st May 2015, 12:27   #3  |  Link
pandy
Registered User

Join Date: Mar 2006
Posts: 1,049
Quote:
 Originally Posted by Rash I have been playing with compand's points, but I couldn't come up with good values myself. Moreover, do I need to know exactly the volume ranges of each person in the room to make good guesses on transfer points? Or do you think it is possible to come up with a transfer function that works for all my recordings? Thank you!
I use something like this in ffmpeg:

Code:
`compand=0.1|0.1:0.60|0.60:-76/-999|-60/-30|-30/-20|-20/-15|-9.309/-6.0206|0/-3.103:6:%ngain%:-90:0.6`
This is heavy compression with some clipping protection, %ngain% usually in my case is equal to -6.0206 ( this is for preemphasis i use - highpass filter with +6dB gain and frequency samplerate/4 but it may be not OK for your needs - good luck

btw i'm not author for this trick

 21st May 2015, 20:52 #4  |  Link Rash Registered User     Join Date: Aug 2002 Posts: 403 Thank you so much for the reply guys. I have been doing my tests as well and I believe I might have found a way out with compand. I haven't figured all the parameters yet (such as what do I use for soft-knee and a sweetspot to decay), but at least I do get a "normalized" audio on the output. This is my current compand filter (note, this is at ffmpeg filter order): Code: `compand=.1:.2:-90/-900|-72.1/-12.1|-60.1/-12.1|-48.1/-12.1|-36.1/-12.1|-24.1/-12.1|-12/-12:.01:0:-90:.1` It has a completely mute noise gate at the beginning (which I love) and then it brings several 12dB sections to 12dB volume range. I've also tried adding some clipping protection but I believe it isn't perfect yet. Moving forward, I want to try bringing the individual audio sections to -24->-12 range instead (and leave -12->0 untouched) or maybe do a broader range such as 24dB instead of 12dB. I'm also thinking about using 13dB instead of 12.1dB, which I believe may bring an overall better sound quality with a practically imperceivable volume change.