« »
December 17th, 2006

Automating WinTV-PVR/ivtv captures in Ubuntu Edgy

I just captured a bunch of videotapes from my VHS VCR to my computer using my Hauppauge WinTV-PVR 150 card. My VCR is hooked into Composite 1 on the card, with the Line Out from the VCR going into the Line In on the card. I had this setup kind-of working when I was running Ubuntu Dapper, but once I upgraded to Edgy, I had to reinstall all of the WinTV and ivtv-specific bits again. I used this guide to get everything installed properly again.

For simplicity’s sake, I’ve been doing captures in Linux from the command line, using the very simple cat /dev/video0 > filename method. I would try to remember all of the command line settings for ivtvctl and the timing required to set those bits in the ivtv driver to solve certain problems, specifically an issue with audio. Most times when starting a capture, the audio is completely messed up. It’s not being clipped because of too high a volume on Line In…it’s being compressed strangely. Issuing an ivtvctl command with the desired audio codec very shortly after starting the capture seems to fix the problem.

But, since I’ve been on an “automate everything” kick lately, I wanted a script that would handle everything for me, from setting up the ivtv driver, to picking Composite 1 as the input, to killing the capture after a certain period of time, to starting up Avidemux with the file all ready to be edited. This script is what I use to get this process as automated as I can get it. You’ll need Avidemux and all of its dependencies installed to use it. This script sets up the card to capture DVD-ready streams, to be used with KMediaFactory or whatever you use to make video DVDs. This only handles captures from Composite 1, not from the tuner. Use MythTV for that.

Get the script here

Leave a Reply