Categories: "Devices"

How to get AC-3 5.1 surround sound on your Mac

How to get AC-3 5.1 surround sound on your Mac
Perian includes the a52 codec you need to decode AC-3 out from AVI or MKV files

So your hooked up your Mac to your 5.1 receiver and all you get is lousy stereo? Worry no more, decent AC-3 support is finally available for Mac OSX!

In my case I have an Intel Mac Mini from 2006 hooked up to a Denon AVR-3801 via a fiber optic S/PDIF connection. On most (fairly recent) macs, an SPDIF fiberoptic cable will be the best solution to get the digital 5.1 signal from your mac to your home theater equipment.

Once you make that connection, there is one thing you should be able to do immeditately: play back DVDs in 5.1 Dolby Digital (or DTS or whatever surround track is on the DVD). If not, remove any DVD from the drive, then launch the DVD player app (not Front Row), go to Settings and tell it to output the DVD sound directly to the digital output instead of using the Mac Mini sound processing system.

If still not, the problem is either the cable or the mode selected on your receiver :p

Now, what if you want to convert your DVDs to files on your terrabyte harddrive? (Private use copy is legal here but I can't tell you about your country). So for the video you'll probably use a divx or xvid codec and for the 5.1 audio you'll use an AC-3 codec... and package all that into a nice AVI file.

Now in order to play that back on your mac, you need a bunch of codecs that are now conveniently packaged in a single downloadable package called Perian.

Once you install Perian, you will get playback but the sound will be stereo, or at best, some variation of Dolby Pro-Logic depending on what you set on the Perian preferences pane. But what you actually want is to get the AC-3 audio from the AVI file straight out to the SPDIF digital out without your Mac doing any alterations (especially not a stereo downmix!)

In order to do that you first need to go to your Applications/Utilities folder and launch the "Audio MIDI Setup" app.

At the lower right, you want to set the Digital Out format to 48000.0 Hz. (See screenshot) That's the frequency used by AC3. Some say you also want to set it to 2ch-16bit but I haven't found this to be necessary so I leave it at 2ch-24bit.

Once that is done, you need to launch the Terminal app that you will also find in Applications/Utilities. In the terminal window type the following in order to enable passthrough of the AC3 signal to the digital output:

Read more »

How to fix Mac OS X Terminal Page Up/Down + Home/End of line

Updated for Mac OS X Mountain Lion 10.8.2.

In order to get page up and page down to work properly under Mac OSX Terminal, as well as the home and end of line (EoL), you need to go to Preferences and then Keyboard and configure the right escape key sequences.

(Note for laptop users: you don't have the page up/down and home/EoL keys, but you can simulate them by holding the "fn" key and pressing on an arrow key. So these configurations also apply to you.)

In the Terminal Preferences, go to the Keyboard pane and watch the the keys named 'page up', 'page down', 'home' and 'end'. You will see they already exist but are configured to scroll the buffer rather than sending commands to the server you're connected to.

In order to change this, double click on each of the relevant lines and select Action: "Send string to shell:"

You then need to enter the correct string to send to the shell. This is a multiple key sequence starting with the escape character (which is represented with it's octal code \033). Here are strings you can use for each key:

As of OSX 10.6.8, the correct fix is:

Key Recommended Escape Sequence Other possible sequences you can try if the recommended doesn't work for you
Home \033OH \033[1~ \033[H \001
End \033OF \033[4~ \033[F \005
Page Up \033[5~
Page Down \033[6~

You can either type these strings on your keyboard (start by presseing Esc) or you can just copy paste the strings from above.

It is worth noting that some of these are already bound to Shift-Page Up, Shift-Page Down, Shift-Home and Shift-End (which are obtained with Shift-Fn-Up/Down/Left/Right on a laptop keyboard). So if you can change your habits slightly you don't actually need to reconfigure anything.

Also note that some people (including Apple) recommend to use \033[H for Home but this doesn't actually work in vi or vim. This is why I recommend using \033OH which has worked in any shell or editor for me so far (Mac terminal, Debian terminal, vim, etc.)

If the recommended sequences don't work for you: please try the alternative suggested here. Also please let us know with which shell or editor you are trying to make them work and which escape sequences work best for you. This way we can order them in order of popularity and possibly give specific advice for specific environments to future visitors of this page. Thank you for your feedback.

How to use SSH private keys on Mac OS X

First cool thing that everybody knows already: Mac OSX is based on Unix so you get ssh out of the box.

Second cool thing you may not know: OS X 10.5 actually also comes with an ssh key agent (ssh-agent). That means that, without any additional software (like PuTTY Agent on Windows...), Mac OSX can actually load an encrypted private key into memory and remember it for all subsequent connections...

Third cool thing that almost seems too good to be true: ssh-agent can store the passwords of the encrypted keys into your keychain. Than means that you have to tell it once to remember the decryption password for your key(s) like this:

ssh-add -K .ssh/id_whatever_your_rivate_key_is

And next time you log into your mac and try to ssh somewhere, your private key will be loaded automagically (as long as your keychain is unlocked of course).

Very groovy!!

What's MISSING in the MacBook Air...

Once again, Steve Jobs gave one of his legendary keynote addresses and once again he announced a lot a nice to breathtaking products and enhancements.

But once again, he left out quite a few details...

And once again, I am going to point them out! Yes, just because I can! :p

Note: don't get me wrong, I love that stuff, I buy it all. I just wish the right stuff released in the right order..

Half baked iPhone enhancements

OK, nice software updates, but:

  • Still no copy & paste! Can you believe that? ... but we have wiggling icons now :-/
  • Still no video capture. The hardware is there... but apparently marketing has decided you cannot use it.
  • Still no podcast update "over the air"... but who cares, as long as the keynote is dubbed "Something in the air".
  • Still no games (not that I personally care... but still)

Basically, this looked more like a $20 software release for the iPod touch (which is good, even if you need to pay) than an iPhone event. My bet is they're holding back some more about the iPhone. As Steve says at the end of the keynote: this is what they announced in the first 2 weeks of 2007. There are still 50 weeks to go! (Hint: the iPhone SDK is to be released at the end of February...)

Movie rentals

That was long anticipated. It's nice to have it, but:

  • Movies start after 30 seconds and you can watch them almost live... right... if you have an exceptional broadband connection and you are downloading a standard def movie... no way is this going to happen for mere mortals ordering HD...
  • Now if an HD movie ends up taking 10 hours to download... and you only have 24 hours to watch it, after you initially realized you only had 3 seconds to watch after 30 seconds... there's gonna be a problem. Let alone if you watch one evening and you get interrupted, you may not be able to watch the end before the next evening... more than 24 hours later. Bummer.
  • Release dates are 1 month after DVD releases. So how long is this after you can get the DVD from NetFlix?
  • OK, so I get the DVD from NetFlix... how do I insert that DVD into my Apple TV? I don't right? I need a separate DVD player... how convenient... Oh wait, I could use a Mac Mini instead of an Apple TV. Cool? No, not cool: how do I get the Apple TV software to install on the Mac Mini? Front Row there has barely been updated in years... |-|

Btw, there's a lot more reasons to get a Mac Mini instead of an Apple TV: it gives you access to media that you can't get through Apple! Let's say Joost for starters...

Then Steve also said they asked users and they told him they didn't want music rentals... Why didn't he ask me? I still wish there was a monthly plan where you get unlimited music at 128 kbps (that you can only listen to as long as you're subscribed). That would still let Apple sell me the high quality 256 kbps versions of the songs I like the most.

MacBook Air

That one really kills the Sony TZ... but again:

  • No Ethernet port!! Hello?? Yes I get the 802.11n pink tinted glasses moment... but what if you're in an hotel room that only has wired internet? It's only 2/3rds of the hotels out there... :crazy:
  • Why does Steve sounds so bored (if not evasive) when mentioning the environmental issues addressed in the making of the MacBook Air? Are those few extra dollars in production cost really bugging him that much?

Anyway... despite all this... I'm pretty excited to get my hands on all this stuff. The Time Capsule + Time Machine is brilliant integration! :)

OK, back to playing with my upgraded iPod Touch... ;)

iPod Touch just got better : almost a PDA now!

iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!
iPod Touch just got better : almost a PDA now!

Up to recently, the iPod Touch was just lacking too many features. But it just got better: when loaded with version 1.1.2 of the firmware, you can now edit your calendar and contacts directly on the iPod. If it had notes and/or todo lists with that it would be the hell of a good PDA.

Now, I think I need to get one. Christmas sounds like a good excuse ;)

Thank you to Mike Penny for the photos. More from Mike:

It IS cool, and I have to say the only reason I bought an iPod Touch is because of the calendar & diary features. I was not going to buy one that I had to Jailbreak. There are as yet - at least as far as I can see no other applications that work on it, but I am looking. There aren't even any games on the iTunes site that work yet.