BreadCrumbs: Ivtv-channel

Ivtv-channel

From Luke Jackson

(Difference between revisions)
Jump to: navigation, search
Revision as of 07:14, 5 December 2007 (edit)
Ljackson (Talk | contribs)

← Previous diff
Current revision (07:51, 5 December 2007) (edit)
Ljackson (Talk | contribs)
(Lirc)
 
Line 1: Line 1:
== Summary == == 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.+'''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 == == Requirements ==
Line 23: Line 23:
== Install == == Install ==
-* Copy the script to somewhere where your irexec daemon can use it (read+execute permissions for the user calling irexec). +Save ivtv-channel.py to a folder in your current environment path and ensure it has execute permissions:
-* Edit your ~/.lircrc to make use of the script. Make sure to fine tune it to your remote (see below)+ 
-* Finally execute ''irexec &'' and it should work.+ 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)
<pre> <pre>
-# The following is an example into how to integrate this script with LIRC.+# The following is an example into how to integrate this script with Lirc.
-# Execute irexec & to make it work.+
#-------------------------------------------------- #--------------------------------------------------
-# File: ~/.lircrc (This works with the '''Hauppage 150 Silver & Black Remote''')+# File: /etc/irexec.conf (This works with the '''Hauppage 150 Silver & Black Remote''')
#-------------------------------------------------- #--------------------------------------------------
- begin+ 
- button = Ch++begin
- prog = irexec+ button = Ch+
- config = python /path/to/ivtv-channel.py up+ prog = irexec
- end+ config = python /usr/bin/ivtv-channel.py up
- begin+end
 +begin
button = Ch- button = Ch-
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py down+ config = python /usr/bin/ivtv-channel.py down
- end+end
- begin+begin
- button = OK+ button = OK
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py enter+ config = python /usr/bin/ivtv-channel.py enter
- end+end
- begin+begin
button = Prev.Ch button = Prev.Ch
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py last+ config = python /usr/bin/ivtv-channel.py last
- end+end
- begin+begin
button = 0 button = 0
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 0 &+ config = python /usr/bin/ivtv-channel.py 0 &
- end+end
- begin+begin
button = 1 button = 1
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 1 &+ config = python /usr/bin/ivtv-channel.py 1 &
- end+end
- begin+begin
button = 2 button = 2
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 2 &+ config = python /usr/bin/ivtv-channel.py 2 &
- end+end
- begin+begin
button = 3 button = 3
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 3 &+ config = python /usr/bin/ivtv-channel.py 3 &
- end+end
- begin+begin
button = 4 button = 4
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 4 &+ config = python /usr/bin/ivtv-channel.py 4 &
- end+end
- begin+begin
button = 5 button = 5
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 5 &+ config = python /usr/bin/ivtv-channel.py 5 &
- end+end
- begin+begin
button = 6 button = 6
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 6 &+ config = python /usr/bin/ivtv-channel.py 6 &
- end+end
- begin+begin
button = 7 button = 7
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 7 &+ config = python /usr/bin/ivtv-channel.py 7 &
- end+end
- begin+begin
button = 8 button = 8
prog = ireec prog = ireec
- config = python /path/to/ivtv-channel.py 8 &+ config = python /usr/bin/ivtv-channel.py 8 &
- end+end
- begin+begin
button = 9 button = 9
prog = irexec prog = irexec
- config = python /path/to/ivtv-channel.py 9 &+ config = python /usr/bin/ivtv-channel.py 9 &
- end+end
-#-------------------------------------------------- +
</pre> </pre>
Line 112: Line 123:
[[Category:Linux]] [[Category:Linux]]
[[Category:Mac OS X]] [[Category:Mac OS X]]
 +
 +== See Also ==
 +
 +* [[Lirc]]
 +
 +== Sources ==
 +
 +* http://ivtvdriver.org/index.php/Ivtv-channel

Current revision

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