Configuring your Linux computer as a VCR.


Setting up a Linux VCR turned out to be a bit easier than I thought it would, but it did take a little time and research. I decided to publish my results so others would benefit from the research I've done. There are probably many other ways to do this under Linux, I just happened to get these tools to work well for me.

Requirements:

Step by Step Instructions:


Example .vcrrc file:

[global]
freqtab = us-cable
pixsize = 128 x 96
pixcols = 1
jpeg-quality = 75
mjpeg-quality = 75
toggle-mouse = 0
keypad-ntsc = no
osd = yes

# [Station name]
# capture = overlay | grabdisplay | on | off
# input = Television | Composite1 | S-Video | ...
# norm = PAL | NTSC | SECAM | ...
# channel = #
# fine = # (-128..+127)
# key = keysym | modifier+keysym
# color = #
# bright = #
# hue = #
# contrast = #

[defaults]
norm = NTSC
capture = over
input = Television

[CH0 0]
channel = 0
fine = 0

[CH1 1]
channel = 1
fine = 0

[CH2 2]
channel = 2
fine = 0

Example .xawtv file:

[global]
freqtab = us-cable
pixsize = 128 x 96
pixcols = 1
jpeg-quality = 75
mjpeg-quality = 75
toggle-mouse = 0
keypad-ntsc = no
osd = yes

# [Station name]
# capture = overlay | grabdisplay | on | off
# input = Television | Composite1 | S-Video | ...
# norm = PAL | NTSC | SECAM | ...
# channel = #
# fine = # (-128..+127)
# key = keysym | modifier+keysym
# color = #
# bright = #
# hue = #
# contrast = #

[defaults]
norm = NTSC
capture = over
input = Television

[CH0 0]
channel = 0
fine = 0

[CH1 1]
channel = 1
fine = 0

[CH2 2]
channel = 2
fine = 0

[CH3 3]
channel = 3
fine = 0

Example cron script:

First create your shell script to change channels then record the show. In this example, it sets the station to your third preset found within your .xawtv file. No, the number 2 does not mean "channel 2" it means "preset 2", with presets starting at 0. I don't have CH0 or CH1 on my cable network, but I added them in there so that preset# equals channel#. Here is the script to run from cron: (note, you may need to set LD_LIBRARY_PATH so it can find avifile libraries)
#!/bin/sh
DATE=`date +%m%d%y`
FILENAME=/multimedia/movies/show-6pm-$DATE.avi
v4lctl setstation 2
vcr -t 60m $FILENAME

After creating your script, call it as follows from cron:

00 06 * * 1-5 /path/to/recordshow6.sh
There you go, now every weekday at 6pm you should switch to preset 2 (which is channel 2 in this case), then start recording for 1 hour. Note that I have my .vcrrc file set to 25 fps. If you need to conserve space or have a slow computer, you may try 15 fps. I didn't personally like the jumpiness and out of sync audio to lip movements at 15 fps rate though. At 25fps, you will be able to record approx 1 hours worth of data in 440mb (small enough to fit on a CD-R).
--
Twivel
[Home Page] [Mail Me]