#!/bin/sh # SUBSYSTEM : tv tuner * # * # FILE : tunetv * # * # HISTORY : * # 20070903 Pete Harlow v00.01.00 First write * # * # tunetv - a script to drive tuner cards via ivtv * # Copyright (C) 2007 Peter Harlow * # * # This program is free software; you can redistribute it and/or modify * # it under the terms of the GNU General Public License as published by * # the Free Software Foundation; either version 3 of the License, or * # (at your option) any later version. * # * # This program is distributed in the hope that it will be useful, * # but WITHOUT ANY WARRANTY; without even the implied warranty of * # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # GNU General Public License for more details. * # * # You should have received a copy of the GNU General Public License * # along with this program; if not, write to the Free Software * # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * TVDEVICE="/dev/video0" # v4l2-ctl see http://ivtvdriver.org/index.php/V4l2-ctl # ivtv-tune see http://ivtvdriver.org/index.php/Ivtv-tune # Ubuntu install https://help.ubuntu.com/community/Install_IVTV_Feisty # set to auxiliary input (-n to list inputs) SETAUX="v4l2-ctl -i 2 -d "$TVDEVICE # set to tuner SETTUN="v4l2-ctl -i 0 -d "$TVDEVICE # set to PAL SETPAL="v4l2-ctl -s pal -d "$TVDEVICE #set to SECAM SETSEC="v4l2-ctl -s secam -d "$TVDEVICE # PLAYOUT="mplayer "$TVDEVICE PLAYOUT="vlc pvr:// :pvr-device=/dev/video0 :pvr-norm=0 :pvr-frequency=-1 :pvr-bitrate=-1" echo "TV Device =" $TVDEVICE echo $PLAYOUT case $1 in "bbc1") echo "bbc1" $SETTUN $SETPAL ivtv-tune -t europe-west -c26 -d$TVDEVICE $PLAYOUT ;; "bbc2") echo "bbc2" $SETTUN $SETPAL ivtv-tune -t europe-west -c33 -d$TVDEVICE $PLAYOUT ;; "itv1") echo "itv1" $SETTUN $SETPAL ivtv-tune -t europe-west -c23 -d$TVDEVICE $PLAYOUT ;; "chn4") echo "chn4" $SETTUN $SETPAL ivtv-tune -t europe-west -c30 -d$TVDEVICE $PLAYOUT ;; "five") echo "five" $SETTUN $SETPAL ivtv-tune -t europe-west -c37 -d$TVDEVICE $PLAYOUT ;; #------------------------------------------------------- "plus") echo "plus" $SETTUN $SETSEC ivtv-tune -t france -cK06 -d$TVDEVICE $PLAYOUT ;; "tf1") echo "tf1" $SETTUN $SETSEC ivtv-tune -t france -c25 -d$TVDEVICE $PLAYOUT ;; "fr3") echo "fr3" $SETTUN $SETSEC ivtv-tune -t france -c28 -d$TVDEVICE $PLAYOUT ;; "fr5") echo "fr5" $SETTUN $SETSEC ivtv-tune -t france -c30 -d$TVDEVICE $PLAYOUT ;; "m6") echo "m6" $SETTUN $SETSEC ivtv-tune -t france -c33 -d$TVDEVICE $PLAYOUT ;; #------------------------------------------------------- "aux1") $SETAUX $SETPAL echo "aux1" $PLAYOUT ;; "aux2") $SETAUX $SETSEC echo "aux2" $PLAYOUT ;; #------------------------------------------------------- *) echo "error" esac exit 0