video archival 101

Today begins (resumes?) my great adventure in the wonderful world of trying to make archival quality copies of my favorite television episodes. When we replaced our bedroom television with Tarma, the machine’s primary selling point was her TV tuner card and WinXP Media Center Edition. Aside from some general instability issues – attributed to heat, generally flaky operating system, and possibly issues with the Gateway motherboard – the box has served us quite faithfully.

I tell it, “record Good Eats!” and lo, Good Eats is recorded.

The only problem with this whole idyllic situation is that it isn’t. Each half-hour episode of the show occupies roughly 1.5-1.8 gig of space. But, Ammon! Don’t you complain about half-hours taking up more than 175mb? That’s right. Any good mpeg4 codec should be able to achieve under 400mb/hour of watchable goodness. Therein lies the problem. MCE does not record in a good mpeg4 codec.

Windows Media Center saves its files with an MS-DVR extension. These files are in reality not very different than MS’s previous wrapper formats ASF and WMV (some extra meta-data is included I think, but that’s about it). So, what I really get is some WM9 encoded cruft that is completely unwieldy.

I can’t edit the stuff nicely, and I can’t even export it into a better wrapper format conveniently – since WMV really seems to dislike being stuffed into AVI’s in my experience. If I was happy with the Windows Media format, I could probably turn the quality setting down on the DVR software and see a dramatic decrease in file size – but I am still guessing that they’d be giving me 300-500mb episodes, and that just won’t do.

So, we need to get the files out of that vile MS-DVR format first. I seem to have two options when it comes to this. First, the .NET platform naturally supports all of their wrapper formats so writing something that converts this wierd wrapper into something slightly more friendly (WMV) is trivial. People have done this, and I am currently employing a moderately unreliable program that cunches my episodes down to 400mb and wraps them in an WMV file.

My second option would be preferrable if I could argue the thing into working. MPlayer has support for the wrapper format. However, when I try to play a video, I get this:

As per the MPlayer guys’ instructions, I have investigated the filter that Windows uses on the thing and get this:

CyberLink Video/SP Decoder
@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{B1B77C00-C3E4-11CF-AF79-00AA00B67A42}

The codec status page doesn’t list this as being a supported format. So… I think I am going to be checking the mailing list archives a bit and then submitting a feature request 😉

Anyways, so MPlayer isn’t an option and I’m suffering with DVR2WMV. I could write my own version of the DVR conversion utility, but I doubt I would get any substantial gain out of it – the only thing I could possibly do is try to figure out how to go directly to an mpeg4 AVI file or something.

Oh well, so I have 400mb WMV’s floating around. There are precious few programs that are able to get stuff out of WMV format. The one I am using right now is Blaze Media Pro. It seems to be doing the job well enough. My stack of large WMV’s is rapidly turning into a stack of XviD encoded AVI’s that only occupy 210-270mb.

Here is my current stumbling block. I would REALLY love to be able to turn them into Ogg files. Vorbis is an incredibly wonderful audio format and I enjoy the patent-free wrapper format as well… but this is apparently not meant to be.

In order to make these files into XviD/Vorbis encoded OGM bundles of joy, I would have to re-encode the video yet again (for those of you who are counting, that would make a grand total of 4 re-compressions). This is probably tollerable since I am starting at such a high quality (80,000kbps) video to start with, but it irks me.

Sigh, I think I just might have to go ahead and settle for that, since I am going to have to edit BlazeMP’s output files anyways if I want to trim the credits and commercials (dropping episode duration down to 20:45 and filesize down to under 150mb). Normally, I would just have Avidemux output a new file without actually re-encoding things (it would just skip the parts I cut out and regenerate the keyframe index). But for some reason that is a just beyond the horizon of my knowledge on this subject, the files that they are outputting break when I try to do this.

I wonder if I should go all out, crop the edges, and shrink the frames a tad – from 640×480 to 512×384? I could probably get episodes that are perfectly watchable full screen and take up less than 100mb each. I think I will try just that.

Leave a Reply

Your email address will not be published. Required fields are marked *