Ivtv-channel
From Luke Jackson
Revision as of 07:19, 5 December 2007 (edit) Ljackson (Talk | contribs) (→Standalone Usage) ← Previous diff |
Revision as of 07:37, 5 December 2007 (edit) Ljackson (Talk | contribs) (→Install) Next diff → |
||
Line 21: | Line 21: | ||
* https://www.jardinpresente.com.ar/websvn/rss.php?repname=utiles&path=%2Ftags%2Fscripts%2Fivtv-channel%2F&rev=0&sc=0&isdir=1 | * https://www.jardinpresente.com.ar/websvn/rss.php?repname=utiles&path=%2Ftags%2Fscripts%2Fivtv-channel%2F&rev=0&sc=0&isdir=1 | ||
- | == Install == | + | == Lirc == |
- | * Copy the script to somewhere where your irexec daemon can use it (read+execute permissions for the user calling irexec). | + | '''Note''': Fedora Core 7's init script for Lirc will automatically launch irexec if the '''/etc/irexec.conf''' file exists. |
- | * 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. | + | 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 | ||
+ | |||
+ | Create the /etc/irexec.conf file and then copy the sample configuration below into this file: | ||
+ | |||
+ | vi /etc/irexec.conf | ||
+ | |||
+ | '''Note''': Make to match the button names with those specific to your remotes 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 = Power |
- | config = python /path/to/ivtv-channel.py up | + | prog = irexec |
- | end | + | config = xset dpms force standby |
- | begin | + | end |
+ | begin | ||
+ | button = Ch+ | ||
+ | prog = irexec | ||
+ | config = ivtv-channel.py up | ||
+ | end | ||
+ | begin | ||
button = Ch- | button = Ch- | ||
prog = irexec | prog = irexec | ||
- | config = python /path/to/ivtv-channel.py down | + | config = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = ivtv-channel.py 9 & |
- | end | + | end |
- | #-------------------------------------------------- | + | |
</pre> | </pre> | ||
Revision as of 07:37, 5 December 2007
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:
Lirc
Note: Fedora Core 7's init script for Lirc will automatically launch irexec if the /etc/irexec.conf file exists.
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
Create the /etc/irexec.conf file and then copy the sample configuration below into this file:
vi /etc/irexec.conf
Note: Make to match the button names with those specific to your remotes 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 = Power prog = irexec config = xset dpms force standby end begin button = Ch+ prog = irexec config = ivtv-channel.py up end begin button = Ch- prog = irexec config = ivtv-channel.py down end begin button = OK prog = irexec config = ivtv-channel.py enter end begin button = Prev.Ch prog = irexec config = ivtv-channel.py last end begin button = 0 prog = irexec config = ivtv-channel.py 0 & end begin button = 1 prog = irexec config = ivtv-channel.py 1 & end begin button = 2 prog = irexec config = ivtv-channel.py 2 & end begin button = 3 prog = irexec config = ivtv-channel.py 3 & end begin button = 4 prog = irexec config = ivtv-channel.py 4 & end begin button = 5 prog = irexec config = ivtv-channel.py 5 & end begin button = 6 prog = irexec config = ivtv-channel.py 6 & end begin button = 7 prog = irexec config = ivtv-channel.py 7 & end begin button = 8 prog = ireec config = ivtv-channel.py 8 & end begin button = 9 prog = irexec config = ivtv-channel.py 9 & end
Standalone Usage
ivtv-channel (up|down|last|enter|channel number)