When to keep AC3 audio track for a video encode

guachi

Senior member
Nov 16, 2010
761
415
136
I feel odd this being my first post considering I've been reading Anandtech since 2000. Anyways...

I have a TV tuner and am recording more shows than is healthy. I use HandBrake to encode them to .mp4 files. It can also encode to .mkv files, but WMP and WMC can't natively read .mkv files. WMP and WMC also can't read .mp4 files that have an AC3 audio track embedded in them. There are fixes - codec packs or use VLC.

That being said, I wonder if it's really necessary to even include an AC3 audio passthru track on the encode in addition to the AAC track.

The source audio shows up always as AC3 and is either listed as 2.0 or Dolby Surround for the Standard Definition stuff or 5.1 for the HD shows. The 2.0/surround sound shows up at a bitrate of 192 kbps and the 5.1 is 384 kbps.

The AAC mixdown options are mono, stereo, Dolby Surround, Dolby Pro Logic II, or 5.1 discrete. The default setting is Dolby Pro Logic II. I encode at a bitrate of 160 kbps.

If I include an AAC track and an AC3 passthru track, the audio uses either 160+192 kbps or 160+384 kbps, which kind of defeats the purpose of encoding to achieve a smaller file size.

Is there any benefit at all (discounting any AC3 playback problems I may have) of including an AC3 passthru track on audio that's 2.0 or Dolby Surround? Should I keep encoding it to Dolby Pro Logic II? Will it sound any different (it will be the same size)?

Should I encode the 5.1 tracks to 5.1 discrete AAC tracks?

What effect is there on encoding the 5.1 tracks to Dolby Pro Logic II, or, conversely, what benefit is there of including the AC3 passthru of 5.1 sound over mixing it down to Pro Logic II?

What audio playback system do I even need to have to take advantage of AC3 audio, anyway?

It's a lot of questions, but I'm fairly clueless when it comes to all the audio options I have for encoding.
 

jtvang125

Diamond Member
Nov 10, 2004
5,399
51
91
Keeping the AC3 intact will depend on your audio system. If all you have are tv speakers or a simple 2.0 then there's not much point keeping it. If you have a nice 5.1 surround sound system then you'll definitely want to preserve the best audio track possible.

I've also never had any problems decoding AC3. Media Player Classic Home Cinema has it own decoder or you can use AC3 Filter to decode it.
 

guachi

Senior member
Nov 16, 2010
761
415
136
I have a (mediocre) 5.1 sound system hooked up to my TV with optical in, so I suppose, in theory, I could hook my computer audio up to it. However, I have a CRT HDTV that I don't think is capable of playing a 1080p image (the 1080i TV shows are encoded to 1080p 30fps)

Some time in the future I might upgrade it but I would be dead as my wife would kill me if I tried to buy a new television.

So, basically, if the source audio is only 2.0 (stereo or Dolby Surround) or the output is 2.0, then AC3 serves no real purpose. If the source is 5.1 AND the speakers are or could be 5.1, then there is some reason to keep it?

What happens when a 5.1 system sees the audio track as Dolby Pro Logic II? Would a regular home theater system even recognize AAC audio, anyway? Mine claims, for an audio CD, to be able to play mp3 and wma files.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
There are lots of solutions, unfortunately most are based on what you will eventually wanna use to playback the files.

Knowing the common restrictions floating around out there, I would encode to an .m4v, click the "large file support" box and then put two audio tracks on it. Track one will be your AC3 5.1 passthru and track 2 will downconvert the AC3 5.1 to ACC 2.0 with Dolby Pro Logic II. 160 kbp/s is more than enough for that track. You could always flip-flop and make the AAC track the default track one and passthru track 2 just so you'll have the cleanest multi-channel audio source to work with in the future if you ever need to reencode something.

The resulting .m4v file should playback on any .mp4 ready system, including Apple playback devices.

I hope that made sense.
 
Last edited:

guachi

Senior member
Nov 16, 2010
761
415
136
It made sense.

I am curious though if you know what happens if I have an AAC audio track and connect my sound card to a receiver via SPDIF. My reading online says that most receivers can't play AAC 5.1 audio, but I'm guessing they can handle AAC Dolby Pro Logic II via SPDIF (otherwise I'd have read messages of people conplaining about it).

If I connect the PC via analog cables (3.5mm to RCA) the fact that it's AAC won't matter as the receiver won't have any clue, right?

I guess what I'm really asking is - if I only ever plan on playing the files on a Windows PC and only outputting the audio to computer speakers or a nice 5/6/7.1 stereo, is there any reason to ever have more than one audio track? Again the audio tracks from the TV shows are either 192 kbps for 2.0 stuff or 384 kbps for the 5.1. I will never own a Boxee Box/WDTV/Apple TV/ipad/ipod.

And if I do only have one track, I can get by with AC3 as long as I have a playback device that can handle it (like VLC) and every stereo in existence can decode AC3. For AAC I get better compression, but I lose 5.1 (unlewss i jum through hoops). And I shouldn't have any problem passing a 2.0 AAC audio stream to a receiver.
 
Last edited:

jtvang125

Diamond Member
Nov 10, 2004
5,399
51
91
If your computer is doing the decoding then it will not matter because it will be sending the decoded analogue signal out to be amplified. However your receiver will have to be able to accept multi-channel analogue in.

If you do a straight pass-through then it will be a hit and miss with your receiver because not many can decode aac audio tracks.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
From the way I see it, the biggest problem is that .mp4, doesn't (technically) support .ac3 audio streams and MPEG-2 containers don't (technically) support avc/.h264 video streams. You can mux those streams into the containers, however, and get them to playback on most devices. It's still the wild, wild west out there with codecs, containers and streams and it'll probably be that way for awhile, heck, .mkv isn't even broadly accepted as a container by commercial entities. We don't know what's gonna be going on five years from now. You can always convert the original track to any other format, but once it's gone, you can never get the original back. That's why I always keep the AC3 multi-channel track (448 or 640kbp/s) in the file somewhere, if possible. That way, I can always convert it to an .aac Dolby Pro Logic II or to an .aac 5.1 track or even a stereo .mp3. In most cases, it's going to be fine to have more than one available audio track on a file and the AC3 track only adds 150mb or so to any 1 hour clip, so unless storage space is problematic, there's no reason not to.

I'm not sure about the compatiblity of all of your hardware, but where possible, I mux my files into .m2ts (MPEG-2) with multi-channel AC3 and a stereo AAC. That way I can also hang onto subtitles where available. Almost everything will playback .m2ts.

My crystal ball says that within the next couple of years, .mkv will claw its way into the commercial sector and almost all HD video will come out in that format (except for Microsoft an Apple who just can't let DRM go away). Video will be AVC/h264 with an .aac multi-channel and an .aac stereo track. Major releases will probably have a 3rd DTS HD track, too. Who knows, though. AC3 will probably die off a short time later, .aac is just so much more efficient.

If you can use VLC instead of WMP then almost all of this becomes a non-issue.
 
Last edited:

lamedude

Golden Member
Jan 14, 2011
1,214
19
81
If its just TV shows you can get away with stereo with ProLogic downmixing. The rarely make good use of the surround channels and I doubt you'll be able to tell the difference between matrixed and discrete 5.1.
 

JSt0rm

Lifer
Sep 5, 2000
27,399
3,947
126
Guys AC3 is horrible compressed. Its just discrete 6 channels but the total stream is like 13kb/s or something like that. Its about mp3 quality. It was amazing in 1998 when all we has was Dolby prologic that derived surround information (mono) and center information from a "LTRT" that is a downmix if the 5.1 audio with phase tricks to hide information in the stereo audio track.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
Guys AC3 is horrible compressed. Its just discrete 6 channels but the total stream is like 13kb/s or something like that. Its about mp3 quality. It was amazing in 1998 when all we has was Dolby prologic that derived surround information (mono) and center information from a "LTRT" that is a downmix if the 5.1 audio with phase tricks to hide information in the stereo audio track.

I don't get what you mean. Most of my AC3 tracks are 384, 448 or 640kb/s. ANYTHING is gonna be horrible if it's compressed to 13kb/s.
 

JSt0rm

Lifer
Sep 5, 2000
27,399
3,947
126
I don't get what you mean. Most of my AC3 tracks are 384, 448 or 640kb/s. ANYTHING is gonna be horrible if it's compressed to 13kb/s.

I over exaggerated a bit :D

But thats for 6 channels of audio! so on a per channel level your looks at nothing. Anyways my point is try to preserve the ac3 is weird as its a compressed format.

http://www.minnetonkaaudio.com/index.php?option=com_content&view=article&id=51&Itemid=80&lang=en

^ you can encode your own ac-3 if you want to see how much compression is done.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
I over exaggerated a bit :D

But thats for 6 channels of audio! so on a per channel level your looks at nothing. Anyways my point is try to preserve the ac3 is weird as its a compressed format.

http://www.minnetonkaaudio.com/index.php?option=com_content&view=article&id=51&Itemid=80&lang=en

^ you can encode your own ac-3 if you want to see how much compression is done.

I still don't follow. Most AC3 tracks off of the DVDs are 640kb/s or 448kb/s. Passing them through without altering the audio stream seems like the best way to preserve sounds as much as possible.

So, your recommendation is to take an already compressed 5.1 audio stream and then compress it further, because, hey, it was compressed once so why not do it again? I can't think of anything worse for audio quality than recompressing an already compressed audio track. I don't think that's what you are saying, but then again.......

I don't understand what your logic and line of thinking is here.
 

JSt0rm

Lifer
Sep 5, 2000
27,399
3,947
126
I still don't follow. Most AC3 tracks off of the DVDs are 640kb/s or 448kb/s. Passing them through without altering the audio stream seems like the best way to preserve sounds as much as possible.

So, your recommendation is to take an already compressed 5.1 audio stream and then compress it further, because, hey, it was compressed once so why not do it again? I can't think of anything worse for audio quality than recompressing an already compressed audio track. I don't think that's what you are saying, but then again.......

I don't understand what your logic and line of thinking is here.

You can grab high quality off of blurays.

Once you are compressed you stay compressed of course.

My point was to say ac3 isnt some quality level we strive for. Its basically a mp3.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
You can grab high quality off of blurays.

Once you are compressed you stay compressed of course.

My point was to say ac3 isnt some quality level we strive for. Its basically a mp3.

OP wasn't using Blu-Ray, hence my confusion. Since he's recording OTA, AC3 is a as good as it's gonna get for the conversation at hand.
 

Aikouka

Lifer
Nov 27, 2001
30,383
912
126
I think I confused myself when it comes to re-encoding a BR rip. I thought using a pass-through with AC3 (on a DTS-HD Master BR track) would pass the entire track through unchanged, but it seemed any scene-based BR rip that I've seen shows up as just DTS or Dolby on the receiver.

So, I loaded my rip of Ip Man into Handbrake and it lists the source as "1 Unknown (DTS) (5.1ch)"... so that means doing an "AC3 Passthru" option would just result in a standard DTS (not HD Master) track? The audio that I had in the MKV that I made wasn't bad, but it lacked bass :\.
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
I don't get why you are married to windows media player, even windows media center plays back mkv and ac3 fine, esp once you install the codec pack klite or shark007 an duse something like media browser plugin.

Reencoding compressed audio, is just not worth the effort.

And you are right, a 1080i crt couldn't really do 720p to be honest, those things for the most part were junk that scanned 1080i blindly, meeting the spec of being allowed to call themselves hd. Only the sony fine pitch models even remotely got close to 1080i, the rest were too coarse phosphor grid to even get close.
 

JSt0rm

Lifer
Sep 5, 2000
27,399
3,947
126
I think I confused myself when it comes to re-encoding a BR rip. I thought using a pass-through with AC3 (on a DTS-HD Master BR track) would pass the entire track through unchanged, but it seemed any scene-based BR rip that I've seen shows up as just DTS or Dolby on the receiver.

So, I loaded my rip of Ip Man into Handbrake and it lists the source as "1 Unknown (DTS) (5.1ch)"... so that means doing an "AC3 Passthru" option would just result in a standard DTS (not HD Master) track? The audio that I had in the MKV that I made wasn't bad, but it lacked bass :\.

The br disk has all of the formats sitting on it. If you go optical out or spdif to the receiver you will get a ac3 with like 640kb/s. If you go hdmi the passthrough is full 192khz 24 bit wav 6 channels.

As for ripping them I really cant help you. I dont even author them. We work on the audio at 24 bit 48khz for most of its life. We record most stuff at 96khz or 192khz but come mix time things are back to 48khz. We dont ever need a generic door close at 192khz 24 bit no one will notice or care. Now if you wanted to slow that door down to quarter speed and have some inception moment with it then yeah work that session at 192khz until its fleshed but then it drops to 48khz for the mix.

This is a good rundown of the bitrates

http://en.wikipedia.org/wiki/Blu-ray_Disc#Audio

Although at home I still listen to and enjoy a good ac3 piped to my receiver. I have no problems with it. I only bring the subject up because in a situation where you want to put stuff down on a drive you probably want the best. I realize this is beyond the scope of the op but this is the only thread about ac3 so it got me thinking about it.