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.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th May 2015, 17:50   #1  |  Link
Rash
Registered User
 
Rash's Avatar
 
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!
Rash is offline   Reply With Quote
Old 20th May 2015, 20:20   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,520
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.
hello_hello is offline   Reply With Quote
Old 21st May 2015, 12:27   #3  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,052
Quote:
Originally Posted by Rash View Post
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
pandy is offline   Reply With Quote
Old 21st May 2015, 20:52   #4  |  Link
Rash
Registered User
 
Rash's Avatar
 
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.
Rash is offline   Reply With Quote
Reply

Tags
automatic gain control, compand, dynamic range compression, ffmpeg audio, microphone

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.