Best Practices for mkv audio tracks

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Best Practices for mkv audio tracks

Post by david3 »

So far I've been encoding my DVDs using the audio defaults for High Profile mkv files. The first audio track is downmixed to 2.0 AAC, and the second audio track is 5.1 AC3 passthrough. Or if there's only a 2.0 audio track on the DVD, I just include a single 2.0 AAC track.

I'm wondering now if that's the best way to do it. Is there any advantage to including a 2.0 AAC track in addition to the 5.1 AC3 track? Would it be just as good to just keep a single 5.1 AC3 track (and let the playback device downmix it when playing back on stereo-only devices)?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

Compared to the overall bitrate of the rest of the encode, a 128 or 160 kbps AAC track isn't going to increase the overall size of the file much and guarantees that you'll have a correct downmix to hand. Relying solely on the 5.1 AC3 track means your playback environment needs AC3 support and needs to be able to downmix correctly, which is not guaranteed. Quicktime for instance makes assumptions about channel layout in AC3 tracks that are often wrong.
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Best Practices for mkv audio tracks

Post by david3 »

Thanks, those are good points.

I guess the main disadvantages are that I'd have to manually select the 5.1 AC3 track when I play it back with a receiver, and the fact that the AAC track may be of questionable quality since it's using the faac encoder (windows).

Most comments I've found discourage the use of the faac encoder due to poor audio quality.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

Yes, compared to the other options available FAAC has languished in recent years. Unfortunately it's the only viable cross platform option we have for the moment, although some progress is being made in ffmpeg's AAC encoder. Still, I'd prefer slightly subpar audio to badly downmixed audio or none at all.
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Best Practices for mkv audio tracks

Post by david3 »

I encoded a test clip from the Rush R30 dvd.

Track 1 AAC faac DPLII 160kbps
Track 2 AC3 5.1 passthrough
Track 3 AC3 ffmpeg DPLII 192kbps
Track 4 MP3 lame DPLII 192kbps

I played it back on my stereo computer speakers using VLC 1.1.5 (windows).

The AC3 5.1 passthrough track (#2) was extremely low in volume. I've noticed lower volume on the 5.1 tracks in general, but this particular sample was even lower than usual. Even with the volume increased, the audio quality seemed poor to me. The AC3 5.1 track played back from the DVD on my main 5.1 system with proper receiver and speakers sounds great, though.

The AC3 ffmpeg track (#3) at 192kbps sounded horrible, with lots of clipping and distortion.

Both the AAC faac track at 160kbps (#1) and the MP3 lame track at 192kbps (#4) sounded ok, though a little different. I listened to them repeatedly and I'm hard pressed to say one was better than the other.

After that, I tried a second test with the same clip, this time with just AAC and MP3 audio.

Track 1 AAC faac DPLII 160kbps
Track 2 AAC faac DPLII 320kbps
Track 3 MP3 lame DPLII 192kbps
Track 4 MP3 lame DPLII 320kbps

The increased bitrates for both AAC and MP3 made only slight differences for me.
david3
Posts: 34
Joined: Fri Dec 24, 2010 5:46 am

Re: Best Practices for mkv audio tracks

Post by david3 »

I hooked up my computer's audio output to a stereo receiver and good quality speakers and compared faac AAC to lame MP3 again.

This particular DVD also includes PCM stereo audio, so I also tried encoding to AAC and MP3 using the PCM audio as the source, and then compared the result to the original PCM audio track.

I think the MP3 track sounds more transparent than the AAC track when compared to the original PCM audio track. The AAC track doesn't necessarily sound bad, but it is a little different.

I think there's a real advantage to including a 2.0 mixdown track, but I'm wondering now if it might make more sense to use lame MP3 to encode the 2.0 mixdown track instead of faac AAC. I suppose that would only be a problem if the playback device can't decode mp3.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

As long as you're using MKV, that's a sound proposition... LAME is a far more mature encoder than FAAC is. MP3 in MKV is well supported... MP3 in MP4 is not.
Shadowmeph
Posts: 3
Joined: Mon Jul 11, 2011 10:57 pm

Re: Best Practices for mkv audio tracks

Post by Shadowmeph »

I apologize for Necromancering this post.
I am having problems with low volume in the .mkv, so if I understand this correctly then I should use LAME instead of the other audio codecs?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

No, you want to update to a nightly build to take advantage of Handbrake's gain adjustment controls.
Shadowmeph
Posts: 3
Joined: Mon Jul 11, 2011 10:57 pm

Re: Best Practices for mkv audio tracks

Post by Shadowmeph »

Where can I find the nightly build?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

Have you had a look at the announcements at the top of every subforum page? ;)
Shadowmeph
Posts: 3
Joined: Mon Jul 11, 2011 10:57 pm

Re: Best Practices for mkv audio tracks

Post by Shadowmeph »

Oh wow I didn't even see that .
Thank you :)
I just used this nightly build and I have to say that I am really impressed with it. now the only question is what is the difference between the .mkv and the m4v?
I tried both on the same file with the same settings and the only difference I can see is a bit of size
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Best Practices for mkv audio tracks

Post by TedJ »

Very little... mp4 and mkv are simply containers that hold video, audio, subtitle and other data streams. They only differ in what audio/video codecs they support and what hardware based players they'll work on.
Post Reply