You are not logged in.

#1 2005-04-22 00:31:45

equivsys
Member
Registered: 2004-07-16
Posts: 14

record tv with mencoder

Just in case anyone is interested here is a basic script to record tv with mencoder.  This script can also be used with freevo (which when running just the recordserver and wbeserver makes a great interface).  I had to rebuild mplayer on my system as apparently when the offical arch package is built the system it is compiled on does not have v4l2.

#!/bin/bash

if [ $# -ne 3 ]
then
        echo "Usage: $0 channel seconds filename"
        exit
fi

WIDTH=640
HEIGHT=480
MENCODER=/usr/bin/mencoder
AUDIO="-oac mp3lame -lameopts cbr:br=128:mode=3"
VIDEO="-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=6400"
DSP="adevice=/dev/dsp"
TV=" -tv driver=v4l2:width=$WIDTH:height=$HEIGHT:outfmt=yuy2:input=0:device=/dev/v4l/video0:norm=NTSC:chanlist=us-cable:channel=$1:$DSP"
$MENCODER tv:// $TV $VIDEO $AUDIO -endpos $2 -ffourcc divx -o  "$3.avi"

--
Alex

Offline

Board footer

Powered by FluxBB