BreadCrumbs: Ivtv-channel

Ivtv-channel

From Luke Jackson

Jump to: navigation, search

Contents

Summary

ivtv-channel is an utility to change channels with a remote control. It is designed to work along with Lirc. It is very useful for watching ivtv in standalone applications such as VLC or MPlayer.

Requirements

  • Python >= 2.4
  • Ivtv utilities >= 0.4

As far as I know it's compatible all the way back to 0.4, either way, it detects the major API change in 0.8 and works automatically across all recent versions.

Download

The latest version of the script can be downloaded from the link below:

Only tagged (final) released versions should be used, but the trunk development version is also available in that repository.

An RSS feed of releases can be found at the link below:

Install

Save ivtv-channel.py to a folder in your current environment path and ensure it has execute permissions:

cd /usr/bin/
wget --no-check-certificate https://www.jardinpresente.com.ar/svn/utiles/tags/scripts/ivtv-channel/0.5.2.1/ivtv-channel.py
chmod +x ivtv-channel.py

Lirc

Note: Fedora Core 7's init script for Lirc will automatically launch irexec if the /etc/irexec.conf file exists.

Create the /etc/irexec.conf file and then copy the sample configuration below into this file:

vi /etc/irexec.conf

Note: Make sure the button names match with those specific to your remote's configuration. (See Config Below)

# The following is an example into how to integrate this script with Lirc.
#--------------------------------------------------
# File: /etc/irexec.conf (This works with the '''Hauppage 150 Silver & Black Remote''')
#--------------------------------------------------

begin
	button = Ch+
	prog = irexec
	config = python /usr/bin/ivtv-channel.py up
end
begin
 	button = Ch-
 	prog = irexec
	config = python /usr/bin/ivtv-channel.py down
end
begin
	button = OK
 	prog = irexec
        config = python /usr/bin/ivtv-channel.py enter
end
begin
 	button = Prev.Ch
 	prog = irexec
	config = python /usr/bin/ivtv-channel.py last
end
begin
 	button = 0
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 0 &
end
begin
 	button = 1
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 1 &
end
begin
 	button = 2
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 2 &
end
begin
	button = 3
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 3 &
end
begin
 	button = 4
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 4 &
end
begin
 	button = 5
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 5 &
end
begin
 	button = 6
        prog = irexec
        config = python /usr/bin/ivtv-channel.py 6 &
end
begin
 	button = 7
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 7 &
end
begin
 	button = 8
	prog = ireec
	config = python /usr/bin/ivtv-channel.py 8 &
end
begin
 	button = 9
	prog = irexec
	config = python /usr/bin/ivtv-channel.py 9 &
end

Standalone Usage

ivtv-channel (up|down|last|enter|channel number)

See Also

Sources

Personal tools