View Full Version : QT and 5.1 sound - maybe possible


Further
03-19-07, 11:42 AM
According to Apple, QT 7 does support 5.1 sound output (http://developer.apple.com/documentation/QuickTime/Conceptual/QT7UpdateGuide/Chapter02/chapter_2_section_6.html#//apple_ref/doc/uid/TP40001163-CH313-784529). However, most of us have never actually been able to hear it.

On the Macworld forums, someone describes (http://www.macworld.com/forums/ubbthreads/showflat.php?Number=409563) what sounds like an interesting method to actually have QT play 5.1 sound. The description is in the third message. He describes how to do this from a DVD, however, if you already have a film in another format, it may be possible to eliminate his first few steps.

The Apple document, which is intended for developers, does not say specifically that output from QT can be sent to the optical audio output, however, since the article is for people writing applications that will use QT for audio support, perhaps that is why. Perhaps a programmer here could take a look at the document and see if says anything about this issue.

Cclear
03-19-07, 11:58 AM
While true, the current problem for most is for Quicktime to pass a DolbyDigital AC-3 Stream OUT the Digital Output. QT does support 5.1 audio with AAC. But - most all surround receivers can't decode a 5.1 AAC stream, even if we could pass the 5.1 AAC stream out of QT. All our surround receivers are DD or DTS.

This project - http://trac.cod3r.com/a52codec/wiki - allows QT to read a AC-3 stream - BUT - due to something in the core audio of OS X, it has to down convert the 5.1 to stereo PCM for output. (So the hope is that Apple will give us this ability in the next OS release.)

There is a small work around with griffin's firewave (http://www.griffintechnology.com/products/firewave/) -- as this will decode the 5.1 (Either AAC or DolbyDigital 5.1) and output analog 5.1 channels, it does NOT give you digital out. (and your audio reciever needs to have 5.1 analog inputs) -- Just not high quality enough.

Ideally, (dreaming here) I would like the ability to transcode AAC 5.1 signal to AC-3 (and pass a AC-3 stream) - to output over the digital output.

Further
03-19-07, 12:30 PM
While true, the current problem for most is for Quicktime to pass a DolbyDigital AC-3 Stream OUT the Digital Output. QT does support 5.1 audio with AAC. But - most all surround receivers can't decode a 5.1 AAC stream, even if we could pass the 5.1 AAC stream out of QT. All our surround receivers are DD or DTS.


Thanks for your very interesting reply! I knew about the output problem, but didn't realise there is also the format problem.

Nevertheless, there was something in the Apple document that sounded hopeful, at least to a non-programmer: "QuickTime 7 introduces the audio context––a new abstraction that represents playing to an audio device." If I understand that correctly, a programmer basing an application on QT could at least tell it to output to Digital Output. But, as you say, there remain other problems.

wildrock
03-19-07, 12:52 PM
Then this begs the question, and I'm sorry if it has been discussed before: why would Apple provide its 1080/720p HD trailers with a 5.1 AAC soundtrack if they couldn't be used that way? Makes no sense unless Apple is going to give us the ability to make use of them. They might as well just have given us a stereo sound track, and saved some bandwidth. I can see that the AAC audio format fits in with Fairplay DRM mode, though.

Is Apple going to switch to AC-3 when it adds HD content to the iTunes Store, and provide QT support for it (as the link Further provided above suggests)? Or build in transcode support as Cclear wishes? Or is Apple going to continue to marginalize the Mac in the HD world?

yuvi
03-19-07, 01:38 PM
Some things - there isn't really anything different in QT's handling of 5.1 AC3 and AAC. Both will work fine if you have an analogue 5.1 audio card. The only problem with 5.1 AC3 is that no released AVI importer properly sets the 5.1 channel description (something that should be fixed via the next release of Perian...)

Ideally, (dreaming here) I would like the ability to transcode AAC 5.1 signal to AC-3 (and pass a AC-3 stream) - to output over the digital output.
This may be possible sometime in the future (I'm slowly working on a virtual audio device that will do this for all audio from the computer), but keep in mind that transcoding to AC3 will almost certainly be lower quality than using analogue 5.1 outputs, unless the DAC is somehow terrible enough to offset the loss in transcoding (which would have to be pretty bad given the quality of current free AC3 encoders.)

Nevertheless, there was something in the Apple document that sounded hopeful, at least to a non-programmer: "QuickTime 7 introduces the audio context––a new abstraction that represents playing to an audio device." If I understand that correctly, a programmer basing an application on QT could at least tell it to output to Digital Output. But, as you say, there remain other problems.
It's not quite that simple programatically. You have to go through a lot of hoops to properly set up passthrough, and you then have to handle converting the AC3 to the format that passthrough expects (you're pretending it's 2 channel 16-bit PCM audio, big or little endian depending on the device.) There's a reason VLC is currently the only third party application capable of doing it, and it took them quite some time and many emails to Apple to figure it out.

Also, as for the Apple TV, I personally think that Apple's just going to ignore the issue. I highly doubt that they're going to move to AC3 given that AAC gives better quality at the same bitrate (and the AppleTV doesn't support AC3 audio right now anyways), and I doubt that they're going to license an AC3 encoder for the AppleTV. Of course, there are people who think that Apple has licensed an AC3 encoder for the AppleTV (link mangled due to asinine spam prevention measures: thismuchiknow co uk/?p=24) Of course, we should find out once people start getting AppleTVs.

bdraw
03-19-07, 10:31 PM
The biggest missing feature for the AppleTV is the lack of 5.1 support.
I downloaded a Movie Trailer in HD from apple.com the other day with 5.1 audio.
I used the "Export to AppleTV" feature and it converted the audio to 2.0.

Is there no way to send 5.1 PCM via toslink?

pdubyu
03-20-07, 11:52 AM
Is there no way to send 5.1 PCM via toslink?
Nope, toslink can only support DD, DTS and 2 channel PCM.

IMO, the "holy grail" of Mac surround support has always been transcoding AAC to DD or DTS.

Anything less isn't "plug and play". Only a small minority of Mac owners will ever get a 5.1 internal sound card, Griffin Firewave or aggregate 3 USB sound cards with the MIDI utility, etc.

I'm really shocked to hear that the AppleTV won't decode the 5.1AAC into PCM over HDMI. Is this true?

I've been out of it too long...

bdraw
03-20-07, 03:27 PM
So the only way for the Apple TV to output 5.1 would be either to transcode AAC 5.1 to AC3 and out toslink. Or to convert the AAC 5.1 to PCM and output via HDMI to a receiver that accepts 5.1 PCM via HDMI?

This of course is assuming Apple doesn't create/support Video with AC3 audio tracks.

pdubyu
03-20-07, 04:22 PM
So the only way for the Apple TV to output 5.1 would be either to transcode AAC 5.1 to AC3 and out toslink. Or to convert the AAC 5.1 to PCM and output via HDMI to a receiver that accepts 5.1 PCM via HDMI?

This of course is assuming Apple doesn't create/support Video with AC3 audio tracks.

Yes. If the movie file contained AAC 5.1 that is true (like in Apple QT trailers). Otherwise you are stuck with stereo PCM out toslink and having your receiver process it for surround.

On a normal Mac, you can add a sound card but how many people have that AND 5.1 analog inputs?! That's why I think transcoding is the "holy grail". Unfortunately, Apple would have to license DD or DTS and that is something they haven't shown a willingness to do ever since they put toslink on the first G5.

Hope springs eternal though. I'm still giddy that they gave HT Mac folks a bone by putting toslink on the mini.

Ryan1
03-21-07, 02:13 PM
... This project - http://trac.cod3r.com/a52codec/wiki - allows QT to read a AC-3 stream - BUT - due to something in the core audio of OS X, it has to down convert the 5.1 to stereo PCM for output....

Does this http://sourceforge.net/projects/qtac3codec/ suffer from the same limitations? (It's old, and it doesn't say "multi-channel," but has anyone tried it?)

yuvi
03-21-07, 03:23 PM
Ryan1:
It's the other way around. The old SF project is a SoundManager component, and thus can't get more than 2 channels no matter what. A52Codec is a Core Audio component and thus can handle 5.1, but as I mentioned earlier, no released AVI importer sets it up correctly. Raw AC3 audio will be 5.1 though, assuming a 5.1 analogue sound card. QuickTime doesn't allow for AC3 passthrough to SPDIF.