How to play any video format with the AppleTV 3 from the command line

I finally bit the bullet and bought an ATV3 after nearly a year of holding out and trying other media players (Google TV, WD, Roku).

I finally caved and bought the ATV3 because of how seamlessly it is integrated into all the other Apple products: iPhone, iPad.

Surprisingly, the one thing that the ATV3 does not play well with is the Macbook. You need a newer Macbook with Mountain Lion in order to use Airplay. And of course, it only support the MP4 movie format, and there are no known jailbreak, so this is a real bummer.

But the cool thing is, you can send any MP4 video to the ATV3 with a simple HTTP request. There is even an awesome Ruby library to help you do that: elcuervo/airplay.

Now the only challenge is to convert all your files into MP4 format.

Luckily there are many software that can convert any movie format into MP4 on the fly. If you wanted to really get to the core of it, you can use ffmpeg. But several people have already build nice utility software that does this for you seamlessly. The one I like is airplayit.

They have a built-in webserver which can stream any video as M3U8 — a playlist format that is recognized by ATV3.

So Airplayit + Airplay.rb = play anything you want.