I've written (actually stolen and adapted) a script for recording off of
my /dev/video0 device. you may have to change some stuff, but try it
out.
Art
On Thu, 2004-03-18 at 21:01, Corey Edwards wrote:
> On Thu, 2004-03-18 at 17:47, Brent Thomson wrote:
> > Now, my questions are: 1) What format might that dump be in?
>
> The format is more or less a raw RGB format. You almost never want to
> deal directly with it, for one because it'll fill up your hard drive
> faster than you can blink. It's just like how nobody stores raw audio
> data but rather mp3 or ogg. Instead you'll use an application that will
> encode the data to MPEG, DivX, Quicktime or such. Mplayer[1] comes with
> a great one called mencoder. It's really powerful but the options can be
> pretty intimidating. I've also had success with dvr[2]. Also check out
> this Linux Journal article[3] which has some really interesting ideas.
>
> Corey
>
> 1. http://www.mplayerhq.hu/homepage/
> 2. http://dvr.sourceforge.net/
> 3. http://www.linuxjournal.com/article.php?sid=6232
>
>
>
> ____________________
> BYU Unix Users Group
> http://uug.byu.edu/
> ___________________________________________________________________
> List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
>
#!/bin/bash
if [ $# != 4 ] ; then
echo "Use: tvwatch <channel> <size (large medium small)> <minutes> <filename>"
echo ""
exit 1
fi
# Biggest file size is 700mb, which is 716800kbytes
# but just in case we use a little smaller size
MAXSIZE=700000
#SEGUNDOS=$1
#MINUTOS=$(($SEGUNDOS/60))
MINUTOS=$3
SEGUNDOS=$(($MINUTOS*60))
CHANNEL=$1
FILENAME=$4
if [ "$2" = "large" ]; then
WIDTH=768
HEIGHT=600
fi
if [ "$2" = 'medium' ]; then
WIDTH=640
HEIGHT=480
fi
if [ "$2" = 'small' ]; then
WIDTH=320
HEIGHT=240
fi
echo "width= $WIDTH"
echo "height = $HEIGHT"
#Audio rate is 128bits/s which is 16kbytes/s
AUDIOSIZE=$((16*$SEGUNDOS))
LIBRE=$(($MAXSIZE - $AUDIOSIZE))
RATE=$((($LIBRE*8) / $SEGUNDOS))
echo "Calculating rate for movie which lasts $MINUTOS minutes..."
echo "Estimated rate: $RATE"
FINALSIZE=$(( ($RATE * $SEGUNDOS)/8 + $AUDIOSIZE))
mencoder tv://$CHANNEL -tv driver=v4l:device=/dev/video0:input=0:fps=25:norm=NTSC:alsa:width=$WIDTH:height=$HEIGHT:chanlist=us-cable \
-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$RATE \
-vop scale -zoom -xy 640 -oac mp3lame \
-lameopts abr:br=128 -o $FILENAME
echo "mencoder tv://$CHANNEL -tv driver=v4l:device=/dev/video0:input=0:fps=25:norm=NTSC:alsa:width=$WIDTH:height=$HEIGHT"
____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list