Thoughts and Ramblings

General things I find of interest.

AC3 Passthrough Compatibility Matrix

Since some parts of AC3 passthrough work, and others do not, I decided to create a bit of a compatibility matrix to summarize it. I’ve added the related bug id’s I’ve reported, which have gone unanswered, in parentheses.

The latest version of perian (to be released soon), will choose between using the hack method for passthrough, and Apple’s method. Anywhere labeled “Hack” will never work with Apple’s method, so it is bypassed to avoid their broken code. The hack does not work with all 5.1 receivers. Taking a file format which is not properly framed, and making it into a .mov file will not correct the framing. Likewise, it will not destroy the framing of a properly framed file format.


Rescuing videos from AVI

As I wrote in a previous entry, people have used avi for things which it was never designed.  One of the more notable examples is multi-channel audio bitstreams. In addition, the people who make such files went as far as to do in the completely wrong manner. So, as a result, I looked for a way to rescue data from the avi format so it is actually usable.

Basically, use mkvmerge from mkvtoolnix to convert the avi file to an mkv file. Then, open the file with Perian, and save it as a .mov file. The result is a file which both has the proper framing for AC3 data, and also has the proper frame decode and display information. This means that one can do real AC3 passthrough on avi files. Maybe this will be the ultimate solution.


Limited Real AC3 Passthrough

Well, I got to fiddling around with the existing passthrough on the AppleTV. I found where it works, and where it doesn’t. AC3 passthrough does work in .mov files with 48KHz files, of any bit rate. I did this with importing a .ac3 file into .mov, and adding a video track (ATV doesn’t like playing audio only files). I still need to test 44.1KHz, and 32KHz, but they are a bit harder to find. I have still to come across one of them.


Where's real AC3 Passthrough on the Mac?

In my previous post, I discussed how to do AC3 passthrough using Perian. Unfortunately, this method is really a hack, and doesn’t work in all situations. There is a better solution though.

Apple has enabled AC3 passthrough with Quicktime. They have enabled it on the AppleTV to support playback of their HD movies. The code for passthrough is even in the latest version of Quicktime on the desktop, but the celebration ends there. Apple has not exposed a method for enabling passthrough on the desktop either through the user interface, or a hidden preference. They have not even exposed a method for developers to use it through Quicktime (I’ve tried).


The Correct Way to Enable AC3 Passthrough with Quicktime

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. This also serves as the first place to describe how to enable DTS passthrough. 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.
Note 3: Perian 1.1.4 contains a bug in which DTS passthrough fails to work. This will be fixed in the next version. This has been fixed in Perian 1.2, released Dec 17, 2009.