VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello, I want to re-encode AC3 audio from a mkv to AAC by applying a DRC in order to remove the differences between quiet and loud sounds. Do you know how to do this without having to re-encode the video part?
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    The audio can be separated out of the movie, for example, open the file in Avidemux.
    Use the audio menu at the top to save the audio.
    Fix in an audio editor of your choice.
    Add the audio (and disable the original) by using the same audio menu in Avidemux
    Quote Quote  
  3. You can use ffmpeg for this.

    btw it is not clear what are you mean by applying DRC - are you interested about signal dynamics processing to get similar loudness or to copy DRC metadata embedded in AC-3?
    Also it may be important to get more details - for example if AC3 source is multichannel so downmixing must be performed to for example stereo or there is no downmixing required.
    Last edited by pandy; 12th May 2024 at 04:45.
    Quote Quote  
  4. If there's DRC metadata in the AC-3 it needs to be applied while it's being decoded. It's not all that spectacular though.
    https://ffmpeg.org/ffmpeg-all.html#AC_002d3-Decoder-Options

    As foobar2000 uses ffmpeg for most of it's decoding, buried somewhere in Preferences/Advanced you can specify a value for ffmpeg's drc_scale option. Rather than do that though, you can apply DRC with the Dynamic Audio Normalizer. It's included with ffmpeg and a bit easier to use than the official CLI version (ffmpeg is more GUI friendly). For DRC I'd normally add the following to an ffmpeg command line:
    -af dynaudnorm=f=150:b=1

    Or you could download this version of foobar2000: foobar2000 portable (for audio encoding)
    You'll also need to copy ffmpeg to a specific location if you want to use any of the ffmpeg conversion presets. I'm pretty sure the zip file contains instructions on where to put things (it's been a while).

    Load the audio you want to convert into a foobar2000 playlist, right click and select convert, and you'll see a Dynamic Audio Normalizer conversion preset. FFmpeg applies the DRC and from there the audio is piped to QAAC. There's also another "Compression" preset labelled LoudMax. It's a VST plugin. It's quite good although it only supports stereo audio. If I need to compress multi-channel audio for some reason I always downmix it to stereo first anyway.

    You can open an MKV with foobar2000 and it'll play the audio within, but it doesn't account for any video or audio delay that might be present in the MKV, so when you mux the converted audio you should check to see if a delay needs to be applied. Or extract the audio first with gMKVExtractGUI so any delay will be written to the file name and convert the extracted stream instead. That's usually what I do.

    Image
    [Attachment 79044 - Click to enlarge]
    Last edited by hello_hello; 12th May 2024 at 10:29.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!