Trying to use vlc with lirc

*nix specific usage questions
Nuwanda
New Cone
New Cone
Posts: 9
Joined: 25 Jul 2008 03:51

Trying to use vlc with lirc

Postby Nuwanda » 24 May 2009 22:33

Hi.

I've been trying to configure lirc and lirc support for vlc, without success so far.

Here's what I've got:

OS: openSuSE 11.1
lirc: 0.8.4-1.18
vlc: 0.9.9a

My /etc/lirc/lircd.conf (copied from /usr/share/lirc/remotes/streamzap/lircd.conf.streamzap):

Code: Select all

# # this config file was automatically generated # using lirc-0.7.1-CVS(serial) on Fri Feb 4 23:20:56 2005 # # contributed by Christoph Bartelmus # # brand: Streamzap # model no. of remote control: PC Remote # devices being controlled by this remote: USB receiver # begin remote name Streamzap_PC_Remote bits 6 flags RC5|CONST_LENGTH eps 30 aeps 100 one 889 889 zero 889 889 plead 889 pre_data_bits 8 pre_data 0xA3 gap 108344 toggle_bit 2 begin codes '0' 0x00 # 0 '1' 0x01 # 1 '2' 0x02 # 2 '3' 0x03 # 3 '4' 0x04 # 4 '5' 0x05 # 5 '6' 0x06 # 6 '7' 0x07 # 7 '8' 0x08 # 8 '9' 0x09 # 9 'POWER' 0x0A # POWER 'MUTE' 0x0B # MUTE 'CHANNELUP' 0x0C # CH_UP 'VOLUMEUP' 0x0D # VOL_UP 'CHANNELDOWN' 0x0E # CH_DOWN 'VOLUMEDOWN' 0x0F # VOL_DOWN 'UP' 0x10 # UP 'LEFT' 0x11 # LEFT 'OK' 0x12 # OK 'RIGHT' 0x13 # RIGHT 'DOWN' 0x14 # DOWN 'MENU' 0x15 # MENU 'EXIT' 0x16 # EXIT 'PLAY' 0x17 # PLAY 'PAUSE' 0x18 # PAUSE 'STOP' 0x19 # STOP '|<<' 0x1A # |<< '>>|' 0x1B # >>| 'RECORD' 0x1C # RECORD '<<' 0x1D # << '>>' 0x1E # >> 'RED' 0x20 # RED 'GREEN' 0x21 # GREEN 'YELLOW' 0x22 # YELLOW 'BLUE' 0x23 # BLUE end codes end remote
My ~/.lircrc:

Code: Select all

begin prog = vlc button = play config = key-play-pause end begin prog = vlc button = pause config = key-play-pause end begin prog = vlc button = stop config = key-stop end begin prog = vlc button = skip config = key-jump+medium end begin prog = vlc button = replay config = key-jump-short end begin prog = vlc button = forward config = key-next end begin prog = vlc button = rewind config = key-prev end begin prog = vlc button = up config = key-nav-up end begin prog = vlc button = down config = key-nav-down end begin prog = vlc button = left config = key-lav-left end begin prog = vlc button = right config = key-right end begin prog = vlc button = volup config = key-vol-up repeat = 1 end begin prog = vlc button = voldown config = key-vol-down repeat = 1 end begin prog = vlc button = mute config = key-vol-mute end begin prog = vlc button = pictures config = key-audiodelay-up end begin prog = vlc button = music config = key-audiodelay-down end begin prog = vlc button = more config = key-crop end
I know my remote is being recognized by lirc, because if I cat /dev/lirc, I see that my button presses in the remote are being recognized, and if I do "dmesg |grep lirc", the output is:

Code: Select all

lirc_dev: IR Remote Control driver registered, major 61 lirc_streamzap[-1]: Streamzap, Inc. Streamzap Remote Control on usb2:2 attached lirc_dev: lirc_register_plugin: sample_rate: 0 usbcore: registered new interface driver lirc_streamzap lirc_streamzap $Revision: 1.29 $ registered
I start lircd in no-daemon mode, and after starting vlc (with lirc control enabled), I see the lirc daemon output:

Code: Select all

lircd-0.8.4[7601]: accepted new client on /var/run/lirc/lircd
But pressing the buttons on the remote don't do anything.

What am I doing wrong?? :?

hallergard
Blank Cone
Blank Cone
Posts: 88
Joined: 13 Jan 2009 18:43

Re: Trying to use vlc with lirc

Postby hallergard » 27 May 2009 12:20

Have you started vlc. I am using a button with prog=irexec and config=vlc

hallergard
Blank Cone
Blank Cone
Posts: 88
Joined: 13 Jan 2009 18:43

Re: Trying to use vlc with lirc

Postby hallergard » 28 May 2009 09:25

Don-t know if this is important, but for SuSE my lirc.conf file is in /etc/ though in some other distros it it in /etc/lirc/

hallergard
Blank Cone
Blank Cone
Posts: 88
Joined: 13 Jan 2009 18:43

Re: Trying to use vlc with lirc

Postby hallergard » 28 May 2009 09:30

This is my .lircrc file for SuSE

Code: Select all

include ~/.lirc/Kaffeine.lircrc include ~/.lirc/VLC.lircrc include ~/.lirc/MPlayer.lircrc include ~/.lirc/Amarok.lircrc include ~/.lirc/Mozilla.lircrc include ~/.lirc/Picasa.lircrc include ~/.lirc/Xine.lircrc include ~/.lirc/Totem.lircrc include ~/.lirc/RhythmBox.lircrc include ~/.lirc/xmms.lircrc include ~/.lirc/XBMC.lircrc begin remote = linux-input-layer prog = irexec button = SELECT config = firefox file:///mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Index.html repeat = 0 delay = 0 mode = mozilla end begin remote = linux-input-layer prog = irexec button = TV config = kaffeine && dcop kaffeine KaffeineIface playDvb repeat = 0 delay = 0 mode = Kaffeine end begin remote = linux-input-layer prog = irexec button = VIDEO config = totem '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Music/' config = totem '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Brazilian/' config = totem '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Jazz/' repeat = 0 delay = 0 mode = Totem end begin remote = linux-input-layer prog = irexec button = Audio config = amarok && dcop amarok playlist playMedia /mnt/xp/Documents%20and%20Settings/Krister/My%20Documents/My%20Music/iTunes/iTunes%20Music/Compilations/ config = xmms PLAYLIST_ADD /home/Music.m3u # config = rythmbox& repeat = 0 delay = 0 mode = Amarok end begin remote = linux-input-layer prog = irexec button = MHP config = /opt/google/picasa/3.0/bin/picasa repeat = 0 delay = 0 mode = Picasa end begin remote = linux-input-layer prog = irexec button = RED config = firefox file:///mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/html/index.html repeat = 0 delay = 0 mode = mozilla end begin remote = linux-input-layer prog = irexec button = GREEN config = mplayer -playlist '/mnt/ntfs/Documents and Settings/Krister/My Documents/My Videos/Brazilian/Brazilian.m3u' config = mplayer -playlist '/mnt/ntfs/Documents and Settings/Krister/My Documents/My Videos/Music/Music.m3u' config = mplayer -playlist '/mnt/ntfs/Documents and Settings/Krister/My Documents/My Videos/Jazz/Jazz.m3u' repeat = 0 delay = 0 mode = mplayer end begin remote = linux-input-layer prog = irexec button = YELLOW config = xine '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Music/' config = xine '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Brazilian/' config = xine '/mnt/xp/Documents and Settings/Krister/My Documents/My Videos/Jazz/' repeat = 0 delay = 0 mode = Xine end begin remote = linux-input-layer prog = irexec button = BLUE config = vlc /mnt/xp/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Jazz/ config = vlc /mnt/xp/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/ config = vlc /mnt/xp/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Music/ repeat = 0 delay = 0 mode = VLC end

hallergard
Blank Cone
Blank Cone
Posts: 88
Joined: 13 Jan 2009 18:43

Re: Trying to use vlc with lirc

Postby hallergard » 28 May 2009 09:35

You might also be interested in this file /home/myself/ .lirc/ VLC.lircrc begin
remote = linux-input-layer
prog = vlc
button = Power
config = key-quit
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = EPG
config = key-audiodelay-up
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Radio
config = key-audiodelay-down
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Up
config = key-nav-up
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Left
config = key-nav-left
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Right
config = key-nav-right
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Down
config = key-nav-down
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Enter
config = key-nav-activate
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Exit
config = key-aspect-ratio
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Menu
config = key-disc-menu
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = VolumeUp
config = key-vol-up
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = VolumeDown
config = key-vol-down
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Previous
config = key-chapter-prev
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Mute
config = key-vol-mute
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = ChannelUp
config = key-title-next
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = ChannelDown
config = key-title-prev
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Record
config = key-chapter-next
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Stop
config = key-stop
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Rewind
config = key-jump-medium
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Play
config = key-play-pause
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Fastforward
config = key-jump+medium
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = PreviousSong
config = key-prev
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Pause
config = key-play-pause
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = NextSong
config = key-next
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = vlc
button = Subtitle
config = key-fullscreen
repeat = 0
delay = 0
end

begin VLC

begin
remote = linux-input-layer
prog = irexec
button = text
config = vlc dvd:///mnt/ntfs/dvd/Karlskoga/
config = vlc dvd:///mnt/ntfs/dvd/Brazil/
config = vlc dvd:///mnt/ntfs/dvd/GrandKids/
config = vlc dvd:///mnt/ntfs/dvd/marcus/0-2/
config = vlc dvd:///mnt/ntfs/dvd/marcus/2-4/
config = vlc dvd:///mnt/ntfs/dvd/marcus/4-6/
config = vlc dvd:///mnt/ntfs/dvd/olivia/0-2/
config = vlc dvd:///mnt/ntfs/dvd/olivia/2-4/
config = vlc dvd:///mnt/ntfs/dvd/olivia/4-6/
config = vlc dvd://"/mnt/ntfs/dvd/Lena's Wedding/"
config = vlc dvd:///mnt/ntfs/dvd/lt/1991-92/
config = vlc dvd:///mnt/ntfs/dvd/lt/1992-92/
config = vlc dvd:///mnt/ntfs/dvd/lt/1992-93/
config = vlc dvd:///mnt/ntfs/dvd/lt/1994-96/
config = vlc dvd://"/mnt/ntfs/dvd/Susanne's Wedding/"
config = vlc dvd:///mnt/ntfs/dvd/as/1/
config = vlc dvd:///mnt/ntfs/dvd/as/2/
config = vlc dvd:///mnt/ntfs/dvd/as/3/
config = vlc dvd:///mnt/ntfs/dvd/as/4/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 1
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Toquinho/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 2
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Bethania/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 3
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Buarque/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 4
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Costa/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 5
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Gilberto/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 6
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Alcione/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 7
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Jobim/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 8
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Simone/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 9
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Veloso/
repeat = 0
delay = 0
end

begin
remote = linux-input-layer
prog = irexec
button = 0
config = vlc /mnt/ntfs/Documents%20and%20Settings/Krister/My%20Documents/My%20Videos/Brazilian/Vinicius/
repeat = 0
delay = 0
end

end VLC

poorboywilly
Blank Cone
Blank Cone
Posts: 12
Joined: 03 Apr 2008 23:37

Re: Trying to use vlc with lirc

Postby poorboywilly » 28 May 2009 20:18

I know my remote is being recognized by lirc, because if I cat /dev/lirc, I see that my button presses in the remote are being recognized, and if I do "dmesg |grep lirc", the output is:

Code: Select all

lirc_dev: IR Remote Control driver registered, major 61 lirc_streamzap[-1]: Streamzap, Inc. Streamzap Remote Control on usb2:2 attached lirc_dev: lirc_register_plugin: sample_rate: 0 usbcore: registered new interface driver lirc_streamzap lirc_streamzap $Revision: 1.29 $ registered
I start lircd in no-daemon mode, and after starting vlc (with lirc control enabled), I see the lirc daemon output:

Code: Select all

lircd-0.8.4[7601]: accepted new client on /var/run/lirc/lircd
But pressing the buttons on the remote don't do anything.

What am I doing wrong?? :?
Run "irw" and push buttons on your remote, make sure it prints out the buttons as you push them, or else something with LIRC isn't set up right.

I am guessing your .lircrc is wrong. I'm pretty sure the button names are case-sensitive, plus there are quotes around your buttons (in the /etc/lircd.conf file), so I think your .lircrc file would probably have to have something like this:

Code: Select all

begin prog = vlc button = 'PLAY' config = key-play repeat = 0 end
Otherwise, maybe try without the quotes. Probably you need to use whatever name the program irw prints when you push that button.

Nuwanda
New Cone
New Cone
Posts: 9
Joined: 25 Jul 2008 03:51

Re: Trying to use vlc with lirc

Postby Nuwanda » 30 May 2009 16:27

I am guessing your .lircrc is wrong. I'm pretty sure the button names are case-sensitive, plus there are quotes around your buttons (in the /etc/lircd.conf file), so I think your .lircrc file would probably have to have something like this:

Code: Select all

begin prog = vlc button = 'PLAY' config = key-play repeat = 0 end
Otherwise, maybe try without the quotes. Probably you need to use whatever name the program irw prints when you push that button.
Yes! That was the problem, the f***ing quotes!! (it is not case sensitive).

Why the f*** do they make the lircd.conf for some remotes with quotes and for some others without them??? :?

Anyway, thank you very, VERY much!!!


(BTW, "--please stay polite--" XD)

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Trying to use vlc with lirc

Postby kmf31 » 03 Jun 2012 18:25

Also a big thank you to this thread ! :wink:

Yesterday, I tried to configure an USB-RC device which I got many years ago with a new PC and which I put into storage because at that time I estimated the chances to make it work under Linux quite low and in any case I didn't really need it at that time.

So with the help of google and several wiki-pages I found out about lirc and the vlc support for lirc (I also recompiled vlc to enable lirc support) and after some time I was able to make the irw command work, so everything concerning kernel and hardware support etc. was perfect. However, VLC didn't react on the RC and it took me a long time to find the solution when I came to this topic and the issue of quotes in the .lircrc file. I would never have imagined that they are that crucial in a configuration file.
Now my remote is nicely working. :D


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 6 guests