Any improvements to Handbrake Audio?

PeterWright wrote on 1/23/2012, 4:57 AM
My recent Avid DNxHD - Handbrake efforts have looked really good, but the audio still sounds "strangled".

I'm using 0.9.5 - could I do better? If not I'll have to use Sony or Main Concept MP4 which are around 3 times bigger.

Some audio settings in Handbrake, such as AC3 ffmpeg allow a higher Bitrate at 640, but they will not play in QT Player ("invalid sample desription"), and presumably therefore may also have trouble streaming, or does this not follow?

so much to learn ..........

Comments

Laurence wrote on 1/23/2012, 7:45 AM
You know, I've never noticed any audio damage in Handbrake (and I call myself an audio engineer) but I've heard this from enough people that I believe it. Strange, because I am usually the first to notice this sort of thing. Can anyone post a before and after of some Handbrake damaged audio? My stuff all seems to sound the same after a Handbrake encode.
PeterWright wrote on 1/23/2012, 8:17 AM
Very good question Laurence - I've been going through and checking just about every variable in this process, and ... I'll confirm this in half an hour after rendering, but I may have discovered that I have been doing Handbrake an injustice, and that it could be that it's the Avid DNxHD step that has been doing the damage!

Because it's an Intermediate format I had assumed that the audio was uncompressed, but I've just found that the template had an audio format called English (QDM2) (QDesignMusic2).

I'm currently rendering with uncompressed audio, and once this one has passed through Handbrake I'll report back with a slice or three of humble pie...

PeterWright wrote on 1/23/2012, 8:42 AM
Well that was it - what a relief! Sorry, Handbrake, it wasn't you, it was the DNxHD template.

The uncompressed audio version came through Handbrake unscathed and is on its way to the client via ftp.
Laurence wrote on 1/23/2012, 9:17 AM
When the previous discussion covered this subject, I stayed a little quiet and I shouldn't have. I guess I didn't want to be the only one who couldn't see the emperor's new clothes ;-)

For anyone looking at this in the future:

1/ Uncompressed audio in DNxHD
2/ Make sure that Vegas sample rate conversion is set to best (it defaults at "good" which is not).
3/ Make sure that Handbrake is not doing a sample rate conversion (set it to the same sample rate as your Vegas render), and that the format's match (Handbrake wants to do a surround to Dolby Pro Logic downmix unless you tell it not to).
musicvid10 wrote on 1/23/2012, 10:14 AM
There is a new AAC encoder available in Handbrake nightly builds, ffmpeg aac. I haven't tested it to see how much better it is than faac, which has a less than stellar reputation at lower bitrates..The nightlies also have much better support for DNxHD in general.

https://build.handbrake.fr/view/Nightlies/job/Windows/

Although not helpful for those of us sending PCM in DNxHD, there are several "passthrough" (smart render) options for AC3 and DTS, also a Lame MP3 encoder, which is really nonstandard for MP4 video but sounds great.

Remuxing the finished audio with the original is also possible, and something I've done from time to time.
musicvid10 wrote on 1/23/2012, 10:40 AM
@ Peter Wright,

PCM audio in DNxHD is one of those little things I took for granted (and shouldn't!)
Completely slipped my mind when you asked in another thread recently.
I'm going to put an annotation on the Youtube tutorial to address that.
R0cky wrote on 1/23/2012, 1:57 PM
How do you get DNxHD to pass through surround? I keep getting errors when I try to render more than 2 audio tracks. I've tried various templates ie uncompressed, 32 bit float, 24 bit, etc.

My project is 24 bit/48 kHz surround.

rocky
musicvid10 wrote on 1/23/2012, 6:30 PM
bastinado,
Render a separate 5.1 AC3 audio file and mux that when you're all done in Handbrake.
[EDIT] I ran some tests.
You can do this in MKVMerge (outputs MKV)
You can do this in TSMuxer (outputs TS)
You can do this in AviDemux (outputs MP4) but you have to wade through some messages.

Not that MP4 with AC3 audio may not play in all devices.
musicvid10 wrote on 1/23/2012, 7:40 PM
Laurence,
I'd like to add your excellent audio instructions to the Description pane on Youtube, with proper credit of course.

The audio workflow was something I overlooked when making the tutorial, because mine has become almost subconscious over time. It will be covered in the next tutorial version.
Weldon wrote on 1/23/2012, 7:47 PM
musicvid, do you have a youtube channel or can you send a link to any tutorials you have done?
R0cky wrote on 1/23/2012, 9:30 PM
MusicVid, HB appears to accept 6 channel input and will encode it as 6 channel AAC. Is there a way to get it to do this?
thanks,
rocky
musicvid10 wrote on 1/23/2012, 10:05 PM
"MusicVid, HB appears to accept 6 channel input and will encode it as 6 channel AAC. Is there a way to get it to do this?"

Not from DNxHD + 5.1 audio file because Handbrake is not a muxer ;?(
Also, I have not found a way to encode 5.1 AAC in Vegas.

So if you're brave, I think AviSynth / MeGUI already has the combination of capabilities you're after. Maybe Nick Hope can jump in here after his connectivity is restored and enlighten us all.

I think these formats will talk to each other better in the future; Handbrake developers are definitely keeping us on their radar, based on a couple of recent developments.

I'll run one more experiment to see if I can remux DNxHD with 6 Ch discrete PCM from Vegas, then encode as 5.1 AAC in Handbrake, but based on past experience, I am not holding my breath. Handbrake pretty much gives PCM a blank stare . . .
;?)

[EDIT] I've posted the question to Handbrake developers on their forum. Will get back with responses here.
NickHope wrote on 1/24/2012, 1:48 AM
So if you're brave, I think AviSynth / MeGUI already has the combination of capabilities you're after. Maybe Nick Hope can jump in here after his connectivity is restored and enlighten us all.

It looks like the capability is there in MeGUI and the NeroAAC encoder, but I've personally never done anything more than stereo. Guidance on my Vegas > web workflow is here.
amendegw wrote on 1/24/2012, 4:00 AM
"Laurence, I'd like to add your excellent audio instructions to the Description pane on Youtube, with proper credit of course."In the spirit of "It's always better to ask for forgiveness rather than permission", I'll also put this on our project page. http://www.jazzythedog.com/testing/dnxhd/hd-guide.aspxhttp://www.jazzythedog.com/testing/dnxhd/hd-guide.aspx[/link]

Email me or post back here if this is an issue.

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

Laurence wrote on 1/24/2012, 7:19 AM
>"Laurence, I'd like to add your excellent audio instructions to the Description pane on Youtube, with proper credit of course."

You guys are making me blush...yeah, if I said something worthwhile, repost away. Credit me if you want but it isn't neccessary.

musicvid10 wrote on 1/24/2012, 12:57 PM
Here's an answer from Rodeo, a developer at Handbrake. It's good news, but obviously still a WIP. I'll work on some muxing options at the end of the week. I still have a feeling adding 5.1 AC3 after Handbrake is a better option for now, if your device will play it. Anyone know if we can encode 5.1 AAC directly in newer versions of Vegas?



amendegw wrote on 1/24/2012, 1:50 PM
Whoops! I got my extensions mixed up.

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

Laurence wrote on 1/25/2012, 9:14 AM
So on a PC, which is better audio quality wise for a give bitrate, Libav or Lame mp3? I'm just uploading to Vimeo so I don't care about it being non-standard.
musicvid10 wrote on 1/25/2012, 11:19 AM
Lame probably has the edge over AAC, probably about the same as AC3. They bicker about this stuff all the time on the hydrogenaudio forums.

Youtube only accepts AAC with h264/MP4. I haven't tried anything else on Vimeo so I don't know if it will accept MP3.