Mailing List Archive

Channel surfing script
It's just a shell script, but it makes a decent front-end to ivtvtune.
You'll need a channel map for xawtv, but xawtv itself is unnecessary.
You can generate the channel map with scantv.
I recommend to put the file in /usr/local/sbin/tvchannel, make it
executable, and assign it to some hotkeys.
This way you can channel surf no matter what front end you use to
watch the stream; even when the display is in the background.
I used WinKey+MediaKeyNext (aka Super+XF86AudioNext) for "tvchannel
up" and WinKey+MediaKeyPrevious (aka Super+XF86AudioPrev) for
"tvchannel down".

###BEGIN###
#! /bin/bash
# This script changes channels using ivtv-tune and an xawtv channel
map, but xawtv is not required.

# Get the last channel
CHANNEL=`cat ~/.tvchannelrc`

case "$1" in
up) # Surf channel up if mapped.
CHANGE="`expr $CHANNEL + 1`"
echo $CHANGE > ~/.tvchannelrc
;;
down) # Surf channel down if mapped.
CHANGE="`expr $CHANNEL - 1`"
echo $CHANGE > ~/.tvchannelrc
;;
*) # Switch to named or numbered channel if mapped.
CHANGE="$1"
;;
esac

notify-send --icon=gtk-info --urgency=critical --expire-time=1000
"Channel $CHANGE" "`ivtv-tune -x $CHANGE`"
###END###

Wish-list:
1. More universal notification method? I'm not sure if "notify-send"
works everywhere. This was designed for and tested with Notify-OSD in
Ubuntu Lucid amd64.
2. Clamp notification to video. Currently the notification is placed
in the default location (top right corner of screen for Ubuntu) it
would feel more natural if it displayed over the video stream.
3. GUI for the third input type, specific number or name of a channel
in ~/.xawtv, preferably using the notifications OSD.
4. Find another way to map channels. scantv solved a problem for me:
My channel map is not standard. i have both japan-bcast AND
japan-cable on the same line. I used scantv to make two channel maps
and put them into one by hand. I wish there was a better way.

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users