Recording full HD from a cable box using a Mac

Note: This post isn't for cord cutters. In fact, considering it requires you to have cable, it's quite the opposite. From searching around the internet, I can see that this may help some people, so I figured I'd do a quite little write-up about it.

Recording full HD from a cable box using a Mac

It seems that most cable boxes floating around these days have IEEE 1394 ports on them. IEEE 1394, nicknamed FireWire by Apple, is a serial interface that is similar to USB, but obviously never took off like USB did. This interface was common for DV and MiniDV camcorders, and for D-VHS (which is an interesting read on wikipedia for those who aren't familiar with it).

Why this port is still being built into modern cable boxes is a mystery to me, but we get the benefit of dumping from it. If the port is active, it sends the actual channel bitstream so you get the full MPEG2/AC3 quality that your cable company is sending. I want to reiterate that this is if the port is active; the cable company likely has the ability to disable this in their firmware, so this is a huge instance of YMMV.

This is not a new concept. If you search around, you will find guides going back about a decade. Here is one I kept seeing pop up over and over.

What is AVCVideoCap.app?

Back in the mid-2000s, Apple put out FireWire SDKs to help developers incorporate the technology into their software. One of the example apps they included in this was AVCVideoCap. Despite being just demonstration software, it was a very handy utility that could dump video to a file. Where it differed from most FireWire capture software is that it was more than happy to work with MPEG streams (like those a cable box put out) rather than exclusively with DV video (like that from a digital camcorder). It outputs a MPEG2 transport file which will play in standard players such as VLC and can be re-encoded with software such as Handbrake.

Trying to revisit this capture method today proved difficult for a few reasons:

  • The download link for the FireWire SDK is long since dead.
  • If you do find the SDK, the AVCVideoCap app is outdated and can only supports scheduled recordings before 2008.
  • You need an older mac that still has a FireWire port.

Updated app

I was looking for a quick project over the weekend to keep me busy, so I decided to tackle this. I dusted off my old late-2008 MacBook and did manage to track down the FireWire SDK. I was worried the app was too old to function today, but it did start up and run properly (other than not being able to use the scheduled recording function). I should note that my model MacBook cannot be upgraded past 10.7.x due to a video card incompatibility with newer OSes. I assume the app will still work on newer versions. In case anyone wants it, here is the original AVCVideoCap.app pulled directly from the Apple FIreWire SDK 26.

I wasn't sure if the box would output anything over this port, but was happy and surprised to see that it was. Not only for live TV, but it was doing so for on demand content and premium channels as well. Part of the spec is that there is a flag specifying what copy restrictions exist on video when saving it. Channels are allowed to specify that they are copy once or copy never, but oddly my box was marking every single channel as copy freely. Your mileage may vary, but I was happy to see that I was placed under no restrictions at all.

At this point, I opened up the source and changed the dates in the scheduled recording so that it would actually function past 2008. I had to rewrite some of the code because the source used some date and time functions that were deprecated back in 10.3 and no longer compiled, but that was a good excuse for me to learn XCode a little bit (I had never done any Mac dev before).

After all is said and done, here is the newly compiled AVCVideoCap.app that has the scheduling dates fixed. It targets OS X 10.7 since that's the lowest my version of XCode would allow, so you'll need at least 10.7 to run the fixed version. If your Mac is on an older version, you'll need to use the unfixed version linked a few paragraphs up.

I wasn't able get the channel changing function to work, but I left all the original code for that in so it may work for certain boxes. I may keep playing with this since it can be used as a rudimentary DVR if I am able to get it working, but I'm not sure if I'll have any luck.

Hopefully someone finds some of this helpful. Enjoy if you do.

Below is a quick demo showing the software running on my MacBook.