[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] Video Tape to Digital
Hello there
Don't know if anyone can help with this but thought I might try
anyway. I've been having a go at transferring VHS-C video tape from
my camcorder to my PC. VHS recorder through a WinTV card into the
PC. That's tape to digital format such as .avi or similar. The end
result isn't too bad but it's grainy and low resolution. I'm using
the script from....
http://tldp.org/HOWTO/BTTV/recording.html
Saved as video.sh. You can see the script below. So, the question is
that I'm a bit confused about which part to change so that I can have
higher resolution video transfer (better pictures) . Anyone suggest
which part of the script to change to make some improvements ? I
might be able to filter a finished video through Kino but higher
quality video before editing makes more sense...
#!/bin/bash
# ================= record-tv.sh ============================
# = copyright 2003 by Greg Watson gwatsonATlinuxlogin.com =
# = GPL2 License, minor modifications by Howard Shane =
# = hshaneATaustin.rr.com , under same license =
# = usage record-tv.sh prefix-filename record-time channel =
# = Example: ./record-tv.sh enterprise 61:00 20 =
# ============================================================
# Version 0.9
# Last Mod: Wed Feb 20 11:27 CST 2005
# Output directory
OUTPUT=$HOME/vcr
# Streamer location
STREAMER=/usr/bin/streamer
# Alsa Mixer
AMIXER=/usr/bin/amixer
# v4lctl path
V4LCTL=/usr/bin/v4lctl
# Capture Volume to ensure sound is recorded (80%)
CAPTURE_VOLUME=100
# Tvtime settings file for color/brightness/contrast values
TVTIME=$HOME/.tvtime/tvtime.xml
# End of Config
###############
# check if I'm running TV, if so just exit
if [ `ps -C tvtime | grep -c tvtime` -gt 0 ]; then
echo "TVtime is running, aborting recording."
exit
fi
# If the filename prefix wasn't given, set it to 'recording'
if [ -z $1 ]; then
PREFIX="recording"
else
PREFIX=$1
fi
# if time is blank, record for 30 minutes
if [ -z $2 ]; then
TIME="30:00"
else
TIME=$2
fi
if [ ! -z $3 ]; then
$V4LCTL setchannel $3
fi
# Check for vcr dir
if [ ! -x $OUTPUT ]; then
mkdir $OUTPUT
fi
DATE=`date +%m-%d-%Y-%H:%M`
# Set the AC97 volume to 0 (so we don't hear the sounds)
# Get mixer values first
PLAY_VOL=`$AMIXER -c 0 cget name='Master Playback Volume' | grep : |
sed 's/^.*=\([^,]*\).*$/\1/'`
CAP_VOL=`$AMIXER -c 0 cget name='PCM Playback Volume' | grep : |
sed 's/^.*=\([^,]*\).*$/\1/'`
#
$AMIXER -c 0 -q cset name='CD Playback Volume' 100
$AMIXER -c 0 -q cset name='Capture Volume' 1
# if tvtime.xml is set, then grab settings out of it
if [ -f $TVTIME ]; then
CONTRAST=`cat ${TVTIME} | grep DefaultContrast |
sed 's/^.*value="\([^"]*\).*$/\1/'`
BRIGHTNESS=`cat ${TVTIME} | grep DefaultBrightness |
sed 's/^.*value="\([^"]*\).*$/\1/'`
COLOR=`cat ${TVTIME} | grep DefaultColour |
sed 's/^.*value="\([^"]*\).*$/\1/'`
HUE=`cat ${TVTIME} | grep DefaultHue |
sed 's/^.*value="\([^"]*\).*$/\1/'`
$V4LCTL bright ${BRIGHTNESS}% color ${COLOR}% contrast
${CONTRAST}% hue ${HUE}%
fi
$STREAMER -p 4 -q -t ${TIME} -r 24 -q -o
${OUTPUT}/${PREFIX}-${DATE}-${TIME}.avi -j 90 -f mjpeg -F mono16
# Sometimes streamer doesn't always re-mute audio, mute it again just
to be sure
$V4LCTL volume mute on
# Restore volumes
$AMIXER -q cset name='Master Playback Volume' $PLAY_VOL
$AMIXER -q cset name='PCM Playback Volume' $CAP_VOL
#
# EOF
--
Richard
_______________________________________________
Sheffield Linux User's Group
http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk
FAQ at: http://www.sheflug.org.uk/mailfaq.html
GNU - The Choice of a Complete Generation