Re: Outputting multichannel sound through the optical link??
Re: Outputting multichannel sound through the optical link??
- Subject: Re: Outputting multichannel sound through the optical link??
- From: Hugo <email@hidden>
- Date: Fri, 5 Feb 2010 19:35:41 -0800
>> But the day that you connect any Mac to any hometheatre system using a $10 optical link and get glorious multichannel audio, then I believe that everyone will be interested...
You can do this today. iTunes does support multichannel soundtracks on most of the movies in the iTunes store. The format used is Dolby Digital (= AC3) which is the standard codec used for your DVDs, and can be transmitted on the optical SPDIF connection.
Pretty much all receivers that are less than 15 years old support Dolby Digital decoding, and that'll get you your 5.1ch sound in your living room.
>> Is there any home theatre amplifier out there that can understand something as dumb as a simple stream of N different PCM samples?
Yes. Most recent receivers have HDMI inputs. HDMI connections have enough bandwidth to support multichannel, uncompressed PCM audio (and various formats of compressed audio, lossy or lossless).
----
As far as S/PDIF goes (the optical connector on your Mac), as mentioned previously it only supports 2 channels of uncompressed PCM audio (see IEC standard 60958). It supports transmission of multichannel sound through compressed formats only, such as Dolby Digital (AC3). This is documented in IEC standard 61937 parts1-4.
Dolby Digital supports up to 5.1ch of audio at varying quality depending on the bitrate, but generally it is completely satisfactory for consumer audio. As a point of reference, all DVDs use this format for their multichannel soundtracks, and they are not even using the highest bitrate available.
If you want more than 5.1ch, or if you want lossless compression (e.g. Dolby TrueHD, DTS-HD Master Audio) or even more, completely uncompressed audio, you will need an HDMI connection (for consumer audio). I'll just say that multichannel uncompressed audio takes up *a lot* of space, so it's not necessarily the solution you want. Blu-Ray can afford the space to store that much data, but nobody is going to deliver movies or music online with uncompressed multi-ch audio.
Finally, I can confirm that encoding of PCM audio to formats like Dolby Digital or DTS requires a license from Dolby Labs or DTS. So it's unlikely that Aften is a legal solution.
Cheers,
Hugo
On Fri, Feb 5, 2010 at 1:01 PM, Ryan Walklin
<email@hidden> wrote:
On 6/02/2010, at 4:57 AM, Simon Thorpe wrote:
>
> From my understanding, in order to play a multichannel audio file, I would have to use software like Compressor to generate a Dolby Digiial or DTS or AC3 formatted file. This seems excessively complex.
>
> Is this really necessary? Is there no way just to send the multichannel audio directly out through the optical link? Are there no home theatre amplifiers that could understand a non-proprietry dumb multichannel stream?
>
>
As has been said, this is impossible given the SPDIF bandwidth, as it's only able to support 2 channels at a time.
I've worked round the issue in Plex (www.plexapp.com) by using the free AC3 encoder Aften (aften.sourceforge,net) to encode multichannel PCM (e.g. from AAC/FLAC) to AC3 on the fly, and then output it to SPDIF as Jeff describes, You also need to encapsulate it as per IEC 60958 with a SPDIF header. This allows playback of video with 5.1 AAC etc.
Something like Quicktime is a little harder, as it uses the system sound output by default and won't allow access to the raw audio data when playing back (Using QTKit anyway). So I used the AudioReflectorDriver to create a 6 channel virtual device that redirects sound to a daemon which does the encoding, then plays it over the actual SPDIF device. This allows realtime 5.1 output of any audio playing on the system, and even allows mixing. There's a little latency involved in converting the audio, given the PCM stream has to round trip through kernel space, but minimising the I/O buffers drives it down to ~40ms, which I can't detect watching video.
The source for Plex is freely available at github.com, and has a GPL licence. I haven't released the code for my system-wide AC3 driver, but it shouldn't be too bad as most of the components are open source.
One problem with this solution is that Dolby Digital (DD) is patented and I'm unsure of the legality of Aften in the US. I'm in NZ so it's not a problem.
Regards,
Ryan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden