Thursday, December 6, 2007

Videodrome

Though not a very well respected, accepted, or interesting Debbie Harry movie, this flic sure did have a cool title. And believe me, here at ClassicStickme, we're all about flash over substance. So I can relate.

But what will be harder to relate is the title of this post to it's content. See the theme?? Though there is a connection, it's tenuous at best.

This week has been a week of video induced psychosis for me. Inverse narcolepsy, I call it. I'm so jazzed and focused on a single goal that I simply cannot fall asleep. No matter how hard I try. For the past few days, I've been getting about four hours of sleep for every 24 hours awake. I roll home and fall into bed for a couple of hours, rise, then work until about five in the morning. Then I go down for a couple more hours, wake up and go to work. Repeat.

Surely, dear reader, by now your curiosity is piqued. Read on.

The thing I'm trying to do is perfect a method for converting VHS and Digital8 tapes to DVD. Worth noting at this point that I'm a PC user. Legions of Mac users will be quick to point out that this operation on a Mac is pretty simple. Well, too bad. I love my PC!! The other factor here is that I will not settle for anything less than top quality. So while I agree that there are a few near one-button solutions for the mac, they do not deliver in the quality department. Please Mac users, do not take this as a call to launch an email campaign convincing me of my shortsightedness when it comes to computer selection. I ain't budgin'.

I have attempted this effort before, a few years ago. I spent WEEKS and a few bucks on capture cards trying to get it to work. After extensive head scratching, hair pulling, and fist pounding, I simply decided that the techmology (sic) was not at a point where desktop DVD production was feasable. So I went into vHibernation. ('v' for video, natch).

Flash forward a few years, when I return from journeys abroad to find my interest in all things Stik rekindled. I have a decent speed laptop, and all the firewire cables you could ever need. I decided it was time to sit back down and see if technology had caught up with my dreams.

Like before, it's a slow and labor intensive process. There's also a steep learning curve for every piece of the puzzle. I tried a few one-button solutions, but was left unsatisfied. I resigned myself to the fact that in order to get this done, and get it done RIGHT, i was going to have to learn how to use all these Open Source tools that home video enthusiasts are using. It was, and is, a daunting task. I have assembled a quiver of no less than 10 tools, each of which is integral to the process of making this conversion a reality. There is one tool to capture the video. A scripting language is needed to edit and clean up the movie once captured. The scripting engine requires a different plug in for any effect you might want to do, and has it's own methods to call in the script. Want to reduce chroma shift? You have to find the DLL, install it properly, learn the scripting interface, debug it, get the settings right, then view your movie before it's time to move on. You need to acquire a robust set of codecs, each of which will produce different results that you can control. Learning about the capabilities of the codecs is important, as they respond differently to different inputs.

Once you've finally got your clip edited and filtered, you have to encode it. but to encode it, you need to decide if you're going to output it as a giant AVI file (again recruiting your newfound knowledge of compression/codecs) or if you're going to frameserve to an encoder. Frameserving is another application and another hurdle. Youv'e also got to choose an encoder. There's three big players out there, each with different strengths and weaknesses. Many have a trial version, though a fully functional version must be "acquired" using other means. You choose an encoder, and then have to wade through the pages and pages of options you have to encode each file. HUNDREDS of different settings. Which ones are best for you?? Depends on the nature of your input and output. is it anime? Is it CGI? Is it a VHS transfer, or a DVD rip? Is there lots of motion, or many colors?? tons of things. Enough to make you crazy... or lose sleep.

Once you get the video encoded, you need to re-visit the audio. turns out that the good video encoding products don't do a good job of encoding audio. So you need to strip out (or "de-mux") your audio from your source edit. It usually comes out in wav format, which you need to convert to ac3, or one of the other formats that will work on a DVD. There's a couple of good programs to convert wav to ac3, but because they're these open source, public domain programs, they look like wacky developer tools. many are command line. Say what you will about microsoft products, but the thing they are good at is presenting a common interface. GNU tools: not so much. So the learning curve on all these tools is again pretty sharp. But once you finally convert the audio, you then need a tool to merge (or "mux") the audio back together with the video.

if you happen to have sync problems, you'll need a separate tool to fix that.

Head spinning yet??

And lets say you finally get a DVD compliant video together, then you need to author the DVD. You know, make the menus and stuff. That's a whole 'nuther ball of wax. Again, multiple tools available, with multiple versions. Though I quickly narrowed in on my favorite tool, it has different versions, each of which does different things better than the other. Earlier versions handle some things well, later versions handle different things better. So depending on your needs, you choose an author.

Once authored, you then burn it to DVD. Another tool.

The real tragedy is that ANYWHERE in this process, things can go pear-shaped, or just stop working for no apparent reason. This is the part that makes me crazy. You might get all the way to the burning process, only to notice upon sticking the DVD in your set top player that the audio sync is out. It worked when you authored it! Whuh happun???

All of this is what has been keeping me up at night. Literally. I love problem solving, and when I sink my teeth into something that's this important to me, I don't let go. I literally cannot stop thinking about this challenge. I lie in bed, eyes closed, contemplating better encoding settings. Coming up with solutions to sync problems, thinking of new tweaks to make to my compression algorithms. I can be dead tired, eyes watering from fatigue, yet unable to fall asleep.

But as of this writing, I'm ALMOST there. Last night, I JUST ABOUT HAD IT LICKED, but at the very last encoding pass, the video got speed problems. NO idea how that got introduced, but that's where it stands. It's one of those things where I'll be working away, thinking it's about one in the morning. Then when I look at the clock, its acually four thirty.

I'll just sleep on weekends.

No comments: