Zeno's Paradox
February 25, 2003 - Live TV Ripping - Solved!

I've finally figured out an acceptable method for ripping live TV streams that come in via cable.

I took another stab at trying to encode television and this time, I met with more success than last time. This time, instead of trying a program such as vcr or other real-time encoding applications, I used the basic xawtv application to rip uncompressed audio and video to a file then I ran mencoder's MPEG4 encoder on it to turn it into a DivX.

At the moment, I just have written a tv-encode shell script that is almost identical to the dvd-encode script I wrote for DVDs. Note that this only encodes the TV, it doesn't record it or anything else.

I figure for the recording software, it will probably be better to just write my own that takes advantage of the components such as mencoder and xawtv than it will be to use one of the existing PHP ones (shudder). Since I wrote a similar type of application for Northwestern's video-conferencing folks, I imagine that I can write a decent Java-based application that can do the scheduling and management of the TV shows in a servlet context. I don't have many details worked out at the moment, but I imagine that the final product would be something that I can go to on the web, select a channel that I have, a time duration, and whether I want the recording to repeat or be a one-time deal. One scheduling thread would take care of starting and stopping xawtv (via the xawtv-remote application) and another one would be in charge of encoding the uncompressed audio and cataloging the results. It would keep track of what's been ripped and be able to present a menu of programs to watch via a future set-top box that I'll build. I imagine that I'll use XML as the storage medium for persistent data such as the channel definitions and TV show library. This simplifies things as I don't need a database to set up and Java 1.4's built-in XML functions are good enough for this purpose. I figure that while I'll lack the program guide that Tivo and other products have, the TV schedule in Watson will be adequate for my purposes. The upside is that I'll have accessible DivX files for times when I'm traveling and want to take some things to watch on my laptop on the way. For the curious, I end up using about 5 GB for 30 minutes uncompressed video, and I am able to compress the video faster than 30 minutes on my Athlon to get a DivX that is approximately 200 MB in size. My current 80 GB disk will be adequate for the near term future, but since I have a built-in RAID controller that theoretically can be used for a 600 GB RAID 5 partition (4x200 GB drives), I would be able to record an upwards of 1500 hours of video with a reasonable investment in a few disks. Of course, I'm not planning on getting that big any time soon, but it is nice to know that the potential for growth is definitely there.

At the moment, I only have a few ideas and no code, so I'll keep this page updated with new developments and ideas. If anyone is potentially interested in a copy of any of this software for themselves, post a comment and I'll consider GPL'ing it or something.

Posted by br284 at 10:19 PM

Trackbacks

Comments

Post a comment
Name:


Email Address:


URL:


Comments:




Note that by posting a comment on this site using this form or any other software tool, you have agreed to the advertising terms of this site and you agree to submit payment for any advertising in the comment above as outlined in the advertising terms. This applies to ads posted in the URL or Comment fields above.