I should clarify on my last post about Freevo and MPlayer fighting over LIRC events, since after some more research, I figured out what is going on. Here’s the story.
Freevo, when it uses mplayer to watch a movie, will pass some extra options to the command along with whatever you specified. That in itself is extremely annoying, I think, since you already have a config file for mplayer in ~/.mplayer/config, but the fact represents the philosophy that Freevo has of trying to configure everything all in one place instead of relying on original configuration files. That philosophy wouldn’t be so horribly bad if two things didn’t come into play: you wanted to use your original customizations, and freevo limits your options of the original program by trying to provide such a service. That second one is what I ran into.
Two of the extra options that Freevo sends to mplayer when starting a movie are this: disabling lirc support (-nolirc) and adding slave mode (-slave). If you haven’t heard of slave mode, what it does is when you run it, it will listen for commands you can still pass to the terminal to control mplayer. Some examples would be, display on screen information, skip forward a chapter, seek forward / back, quit, etc. Now if you built mplayer with lirc support, you can directly access all those commands with a simple lircrc file. As an example, I have an old one hosted here.
Now, I should also mention that LIRC is setup so that it will respond to whatever events are pressed, based on what programs are running. So, you could have VLC and MPlayer and MythTV all running on your desktop at once, assign commands to each of them in your lircrc files, and switch between the applications, use your remote, and not have it affect the other programs. Sounds great, right? This is where Freevo starts to change things around.
Remember that Freevo disables LIRC support for MPlayer in the command line. There’s a reason for that – it is capturing all LIRC events being sent, not just the ones to Freevo. Whether this is done by design or not, I can’t be sure. For all I know, it could be a limitation of pylirc. Either way, Freevo is programmed from here on out to take on the role of master of remotes, and process any events you press to the programs you are using. For someone like me, who was gone out of his way to tweak his current setup so that my remote works in *any* MPlayer session, doesn’t like having to re-setup the events in a watered down version through Freevo configs a second time around.
If you want to send a command to mplayer through Freevo, here is what you would have to do: edit your ~/.freevo/local_conf.py and add events for each Freevo event plus the slave command to send to mplayer. Examples can be found in the FAQ:
EVENTS['video']['PREV'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -600') EVENTS['video']['NEXT'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek 600')
Now to be honest, I wouldn’t mind that too much if it weren’t for one simple fact — LIRC gives you more options. With Freevo’s way of doing things, I can’t send multiple events on one keypress, alternate options on keypresses, or set the repeat time. Nope. I can just send slave events, and that’s it. It’s making me pretty frustrated, too.
To be fair to Freevo developers, I honestly don’t know if this is a design flaw of something else or a known implementation. It could be that pylirc is written to listen to all events and not distinguish between programs, and Freevo had to find a way to filter them out. I’m not sure, and I’m going to try and find out for sure, and hopefully see if there’s a way to disable the option.
There is an alternative option. You could setup irxevent to send commands to Freevo directly, but that is kind of sluggish, I’ve noticed, and I don’t really like it.
Also, if you weren’t so anal as I am about your LIRC events, you could just map your slave commands through Freevo to MPlayer just fine and be happy with it. I’m pretty picky about my settings though, so my rant would only affect a very small minority.
Anyway, the fact is that I absolutely love Freevo. It is a *great* little program, perfect for my needs. I just really dislike how it hardcodes some settings into the program like passing extra mplayer commands, and then doing stuff like reinventing the wheel for my LIRC setup. Hopefully there’s a way around this stuff without getting too deep into the code. In the meantime, I switched back to MythTV + MythVideo which is a nice little frontend to browse your media files, but doesn’t come near the number of cool options that Freevo has for customizing your display. At least I can watch my movies, though. 🙂