The Correct Way to Enable AC3 Passthrough with Quicktime
Feb 9th, 2008 by Graham Booker
I have seen a few people post methods about enabling AC3 passthrough, and many of them are overly complicated or in some cases even wrong. Since I designed the code that actually does this, I’ll list the steps here:
Note: This does not work with all receivers. If these instructions fail for you, most likely your receiver will not work with this. Passthrough is still a hack, and thus this hack is still outside of the specs.
Note 2: Apple broke AC3 rather seriously in QT 7.3 (bug id 5594478, go tell them to fix it). If have a .mov file, open it, and it says that it is stereo audio rather than 5.1, this is a symptom of that bug. You will need to have at least Perian 1.1 and re-open the original file that made the .mov file. This bug has been fixed in 7.4.5, but any .mov files created with QT 7.3 or 7.4 are still affected by this bug.
- Install Perian
Just go to Perian.org and click the big download link. Double click on the pref pane, and it’ll install itself. - Connect your receiver
The audio connection must be a digital connection. In all cases that I know of, this means an optical cable from your mac to the receiver. In the case of the AppleTV, this is certainly the case. I suppose this could work with the coaxial digital connection, but I don’t know of the audio hardware that provides this connection. - Change the sample rate to 48KHz
- On the mac, open
/Applications/Utilities/AudioMidiSetup.app - In the lower right, change the format to
48.000KHz, and2ch-16 bit - On the AppleTV, this is much more difficult. I recommend using Sapphire instead. It’ll do this step for you
- On the mac, open
- Enable AC3 passthrough.
This is easy when done correctly. Open/Applications/Utilities/Terminal.appand typedefaults write com.cod3r.a52codec attemptPassthrough 1
To turn off passthrough, you type this instead:
defaults delete com.cod3r.a52codec attemptPassthrough
- Play with 100% volume
This does not mean modify the .mov to play with greater gain than the original .mov file in the properties, but it does mean put your computer’s volume output at the top, and the .mov file should also be at it’s top with the little slider.
That’s it. Play you movies with AC3 audio and enjoy your 5.1 system.
Edit: Added volume information which was missing.
[...] found this gem along with the Perian 1.1 release finally enabled me to get Dolby Digital 5.1 sound from an avi [...]
thanks for this. exactly the info i needed.
Hi Graham,
Any idea why through Quicktime and your method I only get popping with AC3 tracks? But with VLC I get AC3 5.1 pass through without a problem on the same tracks.
I have a M-Audio Transit USB with Optical outputs if this changes anything.
Patrick
Patrick,
Read the notes; they already answer your question.
Thanks for the definitive post. Now my DVDs play in Front Row with AC3 passthrough just fine.
M4Vs, however, do not. It seems to play the bitstream, but the receiver does not recognize it as valid ac3 and engage the decoder. Could the bitstream be corrupted on encoding or is this a failure of the m4v wrapper?
Cheers!
Push,
Most likely that is related to the bug I filed with Apple in QT 7.3 (5594478), and 7.4 still failed to fix. Either way, it is a bug with Apple’s software. Demand they fix this; there is nothing I can do about it.
Thanks, Graham, will do.
I take it all back! Success! 5.1 via ac3 from an m4v Quicktime in Front Row!
I basically went back through every setting and reset every option. I also uninstalled Flip4Mac and reinstalled Perian 1.1.
The big thing seemed to be the AudioMidiSetup had not stuck (output was still at 44.1k) and the c0d3er.a52… passthrough setting was still at “0″. This in spite of my confirming the correct command line had been sent in Terminal (in fact I just went back in the Terminal history and hit “enter” to “fix” it).
I reencoded a single chapter of a movie over and over in various wrappers and with various settings finally settling on .m4v h.264 with ac3 only.
Many thanks, Graham.
Mac Mini 10.5.2, Perian 1.1, Front Row 2.1.2 (232)
Thanks Graham!! And Push for giving the idea of uninstalling all my codecs. After manually taking out all my codecs and reinstalling perian the little blue dolby light is now on when playing through front row. And the best part is that I’m finding out that I have a lot of movies that it’s turning on for.
Many thanks here too Graham.
Hello,
What we would like to do is use a mac as a HD uncompressed 1920×1080 with 5.1 Surround player from Quicktime.
The problem we had was that the receiver via Optical connection uses a stereo track (Toslink/SPDIF) and not a Multi-channel stream with 5.1 on the optical link…
We have a full installed FCP Studio with compressor and soundtrack…
What do we need to get it working?
Wim,
The SPDIF standard only allows either stereo PCM (uncompressed) data, or encoded digital audio (compressed). It does not allow 5.1 PCM (uncompressed) audio. For this, you need to get a computer audio device which has 6 discrete channels.
In order to use the method I described above, you need to first compress the audio into AC3, and then play that back.
When I playback a AC3 file in QT it sounds strange, it sounds digital encoded…. I don’t have my receiver nearby and it doens’t have discrete inputs.
Hello,
I’ve just embedded a uncompressed Quicktime with a Dolby AC3 5.1 Surround testfile and it is working on the system…
You would need QT Pro to do this but this is a big step forward to a QT based Uncompressed HD playout… Maybe in the future the mac would be a 4K files based playout system with AC3 DOLBY 7.1
Wim,
Yes, that would be nice. But for now, I have to seriously question Apple’s commitment to HD because of their lack of support for AC3 on their own (see http://www.cod3r.com/2008/03/wheres-real-ac3-passthrough-on-the-mac/).
BTW, AC3 doesn’t do 7.1. You need Dolby Digital Plus, or Dolby TrueHD for that.
I’m talking with Apple from the post-production site of the story… I’ve also reported the bug… I would like to have this feature on every mac with optical out… Let’s hope they listen…
Greetz,
Wim
So, what about the QT Update from today? Does it fix the QT Bug or do I still need to make these changes?
Do I even have to make these changes? I have a Denon 5.1 AV Receiver and a MacMini connected via Toslink. If I insert a 5.1 DVD would I get 5.1 sound without the hack or not?
Is it possible to use that hack with files having two audio-tracks on it (AAC PL2 _and_ AC3) to have the compartibility to stereo-devices?
Ivan,
It still works. I am playing something with passthrough as I type this. These changes are only for apps that use Quicktime, which DVD Player doesn’t. For it, just turn on the pref to use the digital out.
Rakor,
Yes, just you need to have the AC3 track enabled, and the other tracks disabled.
With the “Teufel Decoderstation 3″ it does not seem to work. I just get a hacked noise (does not sound very nice), I think the raw AC3-stream (undecoded). The status-LED shows no AC3 incomming also.
Its a pity
But thanx for all your work done. So I’ll have to wait for apple, doing their job.
This is a bit tangent to the topic, but I have many files from my previous PC that are h.264 with ac3 5.1 wrapped as AVI. On my new iMac, I would like to convert these to standard M4V wrapper without transcoding (ie. passthrough both audio and video). So far, QT Pro won’t let me do this. The audio pass through checkbox is dimmed out in the export window. The video window does not seem to have a pass through. Do I really need to re-encode my audio and video in order to create a new M4V file, which will then have slightly degraded quality?
Quicktime’s movie inspector says:
H.264 (Perian), 608 x 336, Unknown
AC3, 5.1 (L R C LFE Ls Rs), 48.000 kHz
Frustrating that the video and audio formats seem to be just what I want, yet QT wants me to completely re-encode in order to change the wrapper.
I found out that others seem to have problems with the passthrough since the QT uptate 7.4.5. Maybe it’s the same problem I have because my tests ran after having done the update.
Do you know of any changes done in 7.4.5 related to AC3? Maybe they work on it…. Isn’t one of the changes surround-soud for the AppleTV?
Knodooit,
Just save it as a .mov file. There really isn’t a great need to use the m4v container over the mov container, and mov isn’t even export, it is just simply save.
If you really want the m4v file, the demand of apple that they fix it so that their muxer allows AC3 data. It is entirely in their hands.
Rakor,
They fixed a bug that I had reported relating to AC3. It was a screwup of the channel layout that was introduced in 7.3. All of my tests show AC3 passthrough to work.
Everyone, If you are having issues with AC3 passthrough, then I suggest you also demand of Apple that they fix in. See my next post about this: http://www.cod3r.com/2008/03/wheres-real-ac3-passthrough-on-the-mac/
OK, I’ve just downgraded Quicktime to 7.4.1 using Pacifist. Now I have wonderful AC3-sound out of my surround-set played by Quicktime
So Apple must have done something until 7.4.5. Maybe it is machine-specific. But my Mac Mini now is working.
Thanx a lot
I also had to downgrade to 7.4.1 - after the 7.4.5 upgrade no AC3 was passed thru, just a digital hash stream.
Ok, does anyone know how to INPUT AC3 into Mac Leopard? I want to capture AC3/Dolby Digital audio from another box connected via TOSLINK. I don’t care if it can be processed or decoded, I just need software or hardware that will allow me to capture it. I have found nothing.
[...] Vía: The Correct Way to Enable AC3 Passthrough with Quicktime [...]
I need software that will allow me to capture as an AC3 file the digital input of a Mac. Anyone point me to some? I have tried around a dozen packages, none of them work. Audio Hijack can pass the input to the output, and, that does play as AC3, but, it will not record AC3.
Could someone post a brief tutorial on using Pacifist to downgrade QT to 7.4.1? I tried it and the result is now iTunes will not launch and QT has no audio, so I obviously made a boo-boo! I will now have to reinstall Leopard on that Machine and work my way back (Maybe I can just install 7.4.1 on the way up!). Be careful; Pacifist is a powerful tool, and I am lucky that my Mac Mini still runs…
Reinstalled Leopard, upgraded to QT 7.4.1 and still get the ratcheting noise out of AC3 after following these instructions; same result as with 7.4.5…
AC3 is more important to me on my AppleTV, so I am not to disturbed by my results on the Mac Mini
Michael,
If after following all these instructions, and it doesn’t work, it likely won’t work with your decoder. Read the first note.
I got the above steps to work, but only with .mkv files, and not with any .m4v ones. I used Handbrake to create both. Any thoughts as to why this is? I’d rather use .m4v.
–Dave
Dave,
Blame Apple, this is entirely their fault since it is their component which reads m4v files.
Graham: Yes, thanks, I did read the first comment. All of my tested files do play AC3 through my decoder on my AppleTV, which is my first line of defense when it comes to playing content, anyway. I’ll solve the Mac problem at a later date…