Sunday, January 30, 2011

Movies: TiVo to Mac to Apple TV & iPhone (Part I)

I like to use my TiVo Premiere DVR to record old movies shown on Turner Movie Classics HD. Then I like to transfer the recordings from the TiVo to my Mac to be kept forever. Once they are on my Mac, I like to to add them to my iTunes library, then stream them from iTunes to my Apple TV. I like to be able to watch them on my iPhone as well.

There are ways (often, multiple ones) to accomplish each step. That's the good news. The bad news is that in the past I've run into some pretty hefty stumbling blocks in trying to accomplish one step or another.

One of the main sources of difficulty is that the TiVo records programs in one digital video format, while the Apple suite of products (iTunes, Apple TV, iPhone) prefers another.

The TiVo records programs in a format called MPEG-2, which is indeed the video format that is used by digital cable channels, TCM-HD included. It doesn't matter whether the channel is standard definition or high definition; the digital video is MPEG-2.

Apple products for the most part insist on a different digital video format, MPEG-4, and in particular a variety of that format called H.264. MPEG-4/H.264 can store video using far fewer megabytes than MPEG-2.

In theory, it's easy enough to convert MPEG-2 video to MPEG-4/H.264. In the past, though, my efforts to do so have yielded displeasing results. The tools I've used have tended to be way, way too slow to suit me; or they haven't worked at all; or they've produced output video that's missing audio; or the output was flawed in some other way, such as having the wrong aspect ratio. ("Aspect ratio" is the ratio of image width to image height.)

I think I've finally found a tool to do the MPEG-2-to-MPEG-4/H.264 transcoding swiftly and properly, ImTOO HD Video Converter 6. I'll give a rundown on it later.


TiVo to Mac (and Back to TiVo)

To move TiVo recordings to my Mac I use kmttg. It's a Java-based application that harnesses so-called "TiVo To Go," a capability that's been built into TiVo's operating software for years now. Using kmttg is pretty easy to master, though initial setup is a bit of a pain and then there is a subsequent learning curve. I go into detail about kmttg in Archive HDTV Recordings to Your Mac, Then Stream Them Back to Your TiVo!.

Once you have transferred TiVo programs to your Mac, you can (optionally) delete them from the TiVo itself, then watch them at your leisure by streaming them back to the TiVo. In Viva pyTivo! I detailed how to use the freeware pyTivoX app to send media content back from a Mac to TiVo units.

To use kmttg and pyTivoX you need a home WiFi network (unless you want to run Ethernet cable twixt Mac and TiVo!). To get suitably high WiFi speeds, you need the TiVo to be one of the recently introduced TiVo Premiere models, and it should be using TiVo's new wireless-N network adapter. See TiVo Premiere Is Here! and TiVo Wireless-N Adapter: First Impressions. Your home network should likewise be capable of 802.11n wireless speeds.

Additionally, your home WiFi router should be "dual mode" — capable of running at slower 802-11g speeds, since an iPhone will not connect at "n" speeds, and neither will an Apple TV. (At least, my iPhone 3GS and my first generation Apple TV are not "n"-capable.)

Keep in mind, moreover, that archiving TiVo recordings on a Mac requires a lot of hard drive space, particularly if you, like me, want to archive high-definition 1080i or 720p recordings. For purposes of testing out the capabilities of ImTOO HD Video Converter 6, I've been working with an HD copy of the 1958 musical film Gigi that is about 1 hr. 55 min. long and takes 8.42 gigabytes on my (external USB) hard drive. That's over 4 GB per hour of movie!


Into the iTunes/Apple TV/iPhone World

Just being able to archive TiVo recordings on the Mac and stream them back to the TiVo is a nice thing. But I'm greedy; I want to be able to move those recordings into Apple's iTunes/Apple TV/iPhone suite. That means converting them from MPEG-2 to MPEG-4/H.264.

Before I can hope to convert them, DRM must be stripped from the Mac-archived version. "DRM" refers to "digital rights management," a euphemism for copy protection. Everything a TiVo records is copy protected. TiVo To Go as used by kmttg honors the copy protection, so the first copy made on the Mac, though in the MPEG-2 format, is DRM'ed and supposedly cannot be used by software that TiVo Inc. doesn't authorize.

However, kmttg gets around the DRM problem by then making a second copy of the video that is in the unprotected MPEG-2 format. The first, DRM-protected version of the file has a filename with a .TiVo extension. The second, unprotected version has a filename with a .mpg extension. (kmttg optionally deletes the .TiVo file, leaving just the .mpg file.)

For example, if I record Gigi from TCM HD on my TiVo and use kmttg to archive it to my Mac, I wind up with a file on my Mac's USB hard drive called Gigi.mpg. (The actual filename can be kmttg- amplified by appending, for instance, the date and time of the original TiVo recording, but I'll skip over such niceties here.)

Once I had Gigi.mpg — actually, the file wound up with the redundant name Gigi MPG.mpg — I could use ImTOO HD Video Converter 6 on it. I'll refer to that software as HDVC for short. HDVC costs $49.95. You can download it and try it for free, but the free version will encode only three minutes' worth of a movie.

HDVC installs in your Applications folder and, when launched, puts up a window like this:

HDVC Converter Window


When you are just starting out with HDVC, you'll first want to focus on the Browse... button next to the Destination: file path. That's how you'll select the folder to put the output of your movie file conversions into.

Then you'll want to click on the Add Files icon:




It will bring up a dialog in which to choose the (in my case) Gigi MPG.mpg file. The file will show up in the main part of the window, and it should have a check mark at it's left. (If not, manually click on the check box.)

Next, you'll want to select a profile by clicking on the blue up/down arrows for Profile:. In the image above, I've already selected the Apple TV - H.264 HD Video profile. Here's how I did it:

HDVC Profile Chooser


What's a profile? See all the items listed in the column at the right of the first image above — items such as Video Codec, Video Size, Bitrate, Frame Rate, Level, and Zoom? Taken together, they and several more that would be rendered visible by scrolling the column down serve to determine what kind of output HDVC will make.

For instance, Video Codec = H.264/MPEG-4 AVC determines that the output will be in that particular digital video format and not, say, another well known digital video codec, WMV. ("Codec" is short for "coder-decoder" and refers to the specific way in which the pixels of video information are stuffed into a computer data file and then expanded again when the video is played.)

When, in the Profile Chooser image, I select Apple TV in the left column and then Apple TV - H.264 HD Video in the right, I'm choosing the profile items shown in the Converter Window image. Simple as that!

If I want, I can then override any of the items. Here's what happens to the Converter Window if I manually change the Zoom: item from Letterbox to Full: (Keep aspect ratio):

HDVC Converter Window with Zoom: Full


The following paragraph talks about why I originally did that ...

The default value, Letterbox, means HDVC will take the ultra-wide Cinemascope image of the Gigi MPG.mpg file and add black letterbox bars at top and bottom. In other words, a lot of useless black pixels will be forced into the video. To avoid that, I change the Zoom: item from Letterbox to Full: (Keep aspect ratio). Once I do that, HDVC is smart enough to just encode the actual image itself, and to do so in such a way that the playback device (such as an iPhone or Apple TV) will add the letterbox bars only at playback time. This means that HDVC's output can devote all of its Bitrate: to giving the highest-quality picture possible in terms of how the image looks on a big TV screen.

... but my experiments showed that changing Zoom: for the Apple TV - H.264 HD Video profile made no difference to the output file created by HDVC! In Part II of this series I'll talk about creating HDVC output for the iPhone, and in that case changing Zoom: does make a difference. But for Apple TV - H.264 HD Video, changes to Zoom: are useless. Which is good, because it means you can just "set it and forget it," if you are creating output for the Apple TV. Just select Apple TV - H.264 HD Video and then ...

... once you have everything set up to your satisfaction, just click on the Convert Checked Items icon:




Now the Converter Window looks like this:

HDVC Converter Window During Conversion

The bottom line of the window tells how much of the conversion has been completed, how much time remains, how much time has elapsed, etc. In my testing, converting the Gigi MPG.mpg file takes less than four hours, depending on the profile used. That's lightning fast, compared with other converters I've tried!

No comments: