IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
using aacgain to modify volume of m4v videos, problem recognizing large files?
timcupery
post Sep 17 2012, 21:49
Post #1





Group: Members
Posts: 780
Joined: 19-December 01
From: Tar Heel country
Member No.: 683



When I encode DVD movies to mp4/m4v (h264 video and aac audio) using Handbrake, I then change the file extension to .m4a and replaygain-scan the audio stream. I can do the scanning in either foobar2000 or AACgain (the modified MP3gain variant which can also adjust frame-by-frame volume on aac files). Sometimes there is substantial clipping in the audio stream (with peak values of 1.5 or 1.6), and in such cases I can use AACgain to decrease the volume of the audio stream, before manually changing the file extension back to .m4v or .mp4

The problem I have noticed recently is that AACgain is unable to read some large files. foobar2000 will recognize all of these files with a .m4a extension and can scan replaygain and write tags. But for some movie files, AACgain hangs for a few seconds (apparently trying to read the file) and eventually shows the file but not any RG information that was already in the tags, and AACgain is unable to modify the gain of the file.

This has only happened once I started using Handbrake's "high quality" preset to encode movies; when using the "normal" preset, AACgain was able to recognize and modify gain on all movie files.
This may be a filesize issue (e.g., AACgain cannot handle files that are larger than 1gb) or have something to do with another setting in Handbrake's "high quality" preset.

Any ideas what is going on here? I am using AACgain 1.9


--------------------
God kills a kitten every time you encode with CBR 320
Go to the top of the page
+Quote Post
davelasker
post Sep 17 2012, 23:19
Post #2





Group: Members
Posts: 123
Joined: 1-August 04
From: San Francisco
Member No.: 15951



QUOTE (timcupery @ Sep 17 2012, 13:49) *
The problem I have noticed recently is that AACgain is unable to read some large files. foobar2000 will recognize all of these files with a .m4a extension and can scan replaygain and write tags. But for some movie files, AACgain hangs for a few seconds (apparently trying to read the file) and eventually shows the file but not any RG information that was already in the tags, and AACgain is unable to modify the gain of the file.

This has only happened once I started using Handbrake's "high quality" preset to encode movies; when using the "normal" preset, AACgain was able to recognize and modify gain on all movie files.

I am the author of aacgain, and I also use Handbrake. I'll see if I can duplicate your problem. Stay tuned...
Go to the top of the page
+Quote Post
davelasker
post Sep 18 2012, 01:32
Post #3





Group: Members
Posts: 123
Joined: 1-August 04
From: San Francisco
Member No.: 15951



QUOTE (davelasker @ Sep 17 2012, 15:19) *
I am the author of aacgain, and I also use Handbrake. I'll see if I can duplicate your problem. Stay tuned...

I see the problem.

Start Handbrake and open one of your movies. Make sure you are looking at a modern movie with surround sound. Click the "Audio" tab in Handbrake. Now switch between the "Normal" and "High Profile" presets. You will see that with "Normal", there is a single AAC audio track. But with "High Profile", Handbrake adds an additional AC3 passthrough audio track.

Unfortunately, aacgain can only process files with a single audio track. If you run aacgain manually from the command line on the "High Profile" endcoded MP4, you will see the message "Error: File must contain a single audio track."

To fix the problem, configure Handbrake to set the AC3 Passthru audio track to "None". aacgain is unable to process AC3, only aac so make sure the one remaining audio track in your Handbrake configuration is AAC.

Depending on how much headroom is in the aac decoder used in your player, there may not be any distortion introduced by the clipping, so you might not have to worry about it. You can also use the "Gain" and "DRC" adjustments in the Handbrake Audio panel to control the clipping, thus eliminating the need to run aacgain after encoding.

I find that most movie soundtracks have too much dynamic range for my liking, and, except for the loudest parts, are much too quiet. So I normally set my Handbrake gain to +5, and DRC to 2.5. This gives me reasonable volume overall with minimal clipping. Experiment with these adjustments to see what works best for you.

Hope that helps...

Dave

This post has been edited by davelasker: Sep 18 2012, 01:38
Go to the top of the page
+Quote Post
timcupery
post Sep 20 2012, 05:59
Post #4





Group: Members
Posts: 780
Joined: 19-December 01
From: Tar Heel country
Member No.: 683



QUOTE (davelasker @ Sep 17 2012, 20:32) *
I see the problem. Start Handbrake and open one of your movies. Make sure you are looking at a modern movie with surround sound. Click the "Audio" tab in Handbrake. Now switch between the "Normal" and "High Profile" presets. You will see that with "Normal", there is a single AAC audio track. But with "High Profile", Handbrake adds an additional AC3 passthrough audio track.

Great, very helpful, thanks Dave!
For stuff I've already encoded I can use a muxing program to remove the AC3 stream.

Also, thanks for the tip on compression of dynamic range.

This post has been edited by timcupery: Sep 20 2012, 06:00


--------------------
God kills a kitten every time you encode with CBR 320
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2014 - 12:32