Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Limiting/Normalizing dynamic range in already-encoded mp4 or avi (Read 9825 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Limiting/Normalizing dynamic range in already-encoded mp4 or avi

Hi all, first post to Hydrogenaudio.  Thanks in advance for reading.

I have several movies that I have previously ripped from my DVD collection to digital files, usually either MP4 or AVI container, with either AAC or MP3 audio tracks.  My current setup for playback- I use various devices in different locations to playback files off external hard drives.  (Currently, XBOX360 and Roku.  Maybe primitive, but very convenient.  I don't have capability yet to stream throughout, in which case something like XBMC may solve my problem down the road.)  In the meantime, I've found that many of the files I play have ranges of volume much too wide.  (Loud parts way too loud and soft parts too soft.)  First, there is some confusion over the appropriate terminology- limiting vs normalizing, so I apologize if I use the wrong one.  Clarification there may help.  Also, I generally use Xmedia Recode for various recoding tasks but there is no limiter for audio, only a lowpass filter which wouldn't help me here.  Foobar2000 has two limiters, the Advanced limiter and the Hard -6db limiter, and can load a video file and convert/extract (demux) the audio track in one step to create a new audio track with selected limits applied, which I can then remux as necessary.  However, it is finicky and doesn't allow any specific settings, just whatever is preset with the 'advanced limiter' filter.  I am looking for a program that can take a video file and apply whatever kind of filter may be needed to limit volume range in the audio track by scanning track for peaks and converting or re-encoding as necessary, to then be remuxed with video into a new file.  Any suggestions?

Thanks again.

B

Limiting/Normalizing dynamic range in already-encoded mp4 or avi

Reply #1
If you're playing back on a PC, some media players (including Windows Media Player) include things like Quiet Mode and Auto Volume Leveling which apply dynamic range compression to prevent quiet audio from disappearing when you turn down your volume to respect your neighbours late at night, or similarly to boost average loudness as much as possible.

Also Windows Vista and Windows 7 offer "Loudness Equalization" if you right click the Volume icon in taskbar, Playback Devices, Select device in use, Properties, Enhancements. This, once you've found it, is a useful way of evening out volume variations in all audio sources when they're annoying and you don't care about preserving the dynamic range part of the audio fidelity. It's also handy on YouTube. It tends to boost overall volume, which you then adjust with the master volume control.

Some TVs also offer some form of DRC in their audio options.

I think I've seen options for applying DRC in Handbrake video converter, so that might be worth a look. You might be able to pass the video directly without re-encoding, and only transcode the audio. Otherwise things like MP4Box or FFMPEG might be able to demux, process and remux the streams.
Dynamic – the artist formerly known as DickD

Limiting/Normalizing dynamic range in already-encoded mp4 or avi

Reply #2
Thanks for the reply.

No DRC on my TVs, and playback is not through PC but via video or gaming consoles that do not offer real time equalization plugins.  Can't get DRC to work in Handbrake- it seems I can adjust gain but not DRC.  Handbrake doesn't allow transcoding of audio and copy of video file without re-encoding.  Turns out Xmedia recode can transcode the audio with its default option for "volume normalization -98dB", which I don't know from that description exactly what it's doing.  I will look again at FFMPEG.

Any experience with Adobe products?  I'm starting to read that Soundbooth or Audition may offer this capability.

B

Limiting/Normalizing dynamic range in already-encoded mp4 or avi

Reply #3
With both AAC and MP3 it OUGHT to be possible with frame-by-frame global gain (as used by mp3directcut) but I don't think anyone has implemented DRC this way (which doesn't involve transcoding)

MP4Box seems to be highly regarded in the video encoding community and I've come across a few forum posts using Google on doom9 and video-forums or something like that, giving scripts or commandlines to separate a stream into a video.mp4 and an audio.mp4 file (and AVIdemux commands, IIRC, to do it with AVI also)

People had then been using mp3gain to adjust volume (but not DRC) and using MP4Box etc to remux the A/V streams into a single MP4.
Dynamic – the artist formerly known as DickD