VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. I've tried a few ways to get this working but, alas, must once more turn to you guys for help. With an mp4/ac3 file, I can amplify the audio with this audio script (withMeGUI):

    LoadPlugin("E:\MeGUI\tools\avisynth_plugin\NicAudio.dll")
    NicAc3Source("E:\clip.ac3")
    Amplify(0.3)
    return last

    How should I change that for AAC?

    In the above example the audio was demuxed to begin with. Ideally, I'd like not to have to do that. Thank you.
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Keep the MP4 file as it is, do not demultiplex the audio stream.

    Code:
    LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll")
    LSMASHAudioSource("E:\clip.mp4")
    Amplify(0.3)
    return last
    This decodes the default audio stream from an MP4 file regardless of the audio format, no matter whether AAC or AC3 (or even MP3?).
    Quote Quote  
  3. That worked perfectly. Danke, LigH.de.
    Quote Quote  
  4. Although I'm not sure why you'd adjust the volume of AAC by re-encoding it when you can do it losslessly without even needing to extract it from the MP4.
    Quote Quote  
  5. Hi hello_hello. I've thought on it for a while but I can't see it...

    What method would that be?
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Most probably: AACGain (homepage, Windows binaries).
    Quote Quote  
  7. Or maybe he meant the 'Normalize Peaks' function. Let's wait and see...
    Quote Quote  
  8. I've mentioned it a couple of times now.

    Foobar2000 after a ReplayGain scan, but while it'll adjust losslessly, it's not quite a simple as "increase by XdB" or "decrease by XdB".

    Or MP3GainGUI and the modified version of aacgain.exe (works with both mp3 and aac). There's a link on the Mp3Gain site. After installing Mp3GainGUI you'd rename "mp3gain.exe" to something like "mp3gain.old" (if you want a backup), copy aacgain.exe to the MP3Gain folder and rename it mp3gain.exe.

    Once that's done it'll work for mp3 and AAC. The AAC must be inside an MP4 or M4A container. To simply adjust the volume up or down, there's no need to run a ReplayGain scan first. Just right click and select "Apply Constant Gain".
    Traditional "peak normalising" is disabled by default. The "maximising features" must be enabled in Mp3Gain's options for that, and then you'll find "apply maximum no clip gain" under the right click menu. Peak normalising requires a ReplayGain scan first anyway, to work out what the peaks are, and it's disabled by default because scanning for and applying TrackGain volume is a much better way to make a bunch of unrelated files sound the same level.

    It works for stereo LC-AAC, and from my very limited testing, the scanning and/or adjusting of multi-channel LC-AAC seems to work fine too. I've no idea about HE-AAC as I never use it.
    There's sometimes quite a pause after adjusting the volume losslessly before it appears to complete. I think it's something to do with the MP4 or M4A file being optimised. Just be patient.
    Last edited by hello_hello; 27th May 2016 at 06:37.
    Quote Quote  
  9. OK.... See, I thought you were just talking about audio files when you first mentioned 'gain' tools. I used mp3gain a lot before I moved on to FLAC files for my music collection but I'd never have thought to use it on a video file.
    Quote Quote  
  10. If you've used Mp3Gain a lot I assume you're pretty familiar with it.
    89dB is pretty much the standard target volume for music.
    For soundtrack audio, which is a bit more dynamic, the official standard is about 83dB.
    What I tend to do, is if I have a bunch of related files with different volumes (such as episodes of a TV serious), I scan them, then adjust the target volume down until none of them show the track gain will result in clipping, and that's the target volume I use for those files. It usually ends up between 83dB and 86dB for soundtrack audio.

    The main advantage of MP3Gain over foobar2000 is it has the "apply constant gain" function and the target volume is easy to change when losslessly adjusting MP3/AAC (it's buried in foobar2000's options) and it gives you a nice visualisation of the volume, gain and clipping for each file.
    On the other hand foobar2000 will open, ReplayGain scan and tag all the common audio types, it can apply ReplayGain losslessly to MP3 and AAC, and it can use the saved ReplayGain info to adjust the volume while converting (the target volume can easily be adjusted when converting). It also uses the newer R128Gain scanner which is a little more accurate than the older ReplayGain algorithm.

    I seems a pity encoder GUIs haven't embraced R128Gain or ReplayGain as yet. I think maybe Hybrid includes ReplayGain scanning, but I'm not aware of any other video encoder GUIs that do. It's a wonder it hasn't been added to Avisynth as a built-in audio function, like Normalise() or Amplify(). Maybe one day.
    Last edited by hello_hello; 27th May 2016 at 07:39.
    Quote Quote  



Similar Threads

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