Freevo got bumped in the portage tree recently to its latest upstream release. I didn’t realize this, but we were actually slightly behind their release schedule a bit. The main reason for that is probably that not many developers are using it, and the ebuild is a pain to compile. I really didn’t have anything to do with this release, there were a lot of people contributing to it, and it’s always nice to get user input, patches and ebuilds.

This is the version I’ve been playing with on my box at home. Despite my last post where I railed on Freevo pretty hard, I actually like the program quite a lot. Just like MythTV, it’s a love-hate relationship. I get extremely critical of design decisions of programs that I rely on, especially if they are one of a kind. In short, I’m extremely picky.

I haven’t been using Freevo for a long time, and just started looking at it again recently to use as a frontend to just browse my video library. In that arena, it’s definately got more options than MythVideo for customizing the display and things like that, which is the reason I’m playing with it. I’m still split between choosing between the two, though, so I’m probably going to be spending some time looking at all my fun little options. If I find anything interesting, I’ll be sure to write about it. :)

freevo and lirc

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/ 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. :)

mplayer: display filename on osd with lirc

I’ve been playing with MPlayer, Freevo and LIRC most of all day today, and made some small progress. For one, I found a lovely nasty bug in the latest Freevo, where if I hit the right or left buttons on my remote while watching a movie in mplayer, the event gets sent to both freevo and mplayer. At least I think that’s what it’s doing. What actually happens is that mplayer quits, and I’m blaming Freevo since it works fine by itself outside of that.

Of course, the way Freevo hides and then adds it’s own set of mplayer commands drives me absolutely bonkers. One it has in the latest release is to add -nolirc meaning none of my remote commands are going to work at all. However, I worked around that with mplayer-resume, and I’ll write about that later.

This is the cool thing I stumbled on. Among mplayer’s slave commands is one called osd_show_property_text which will display on screen (osd = on-screen display) the property text of something. In this case, I wanted to display the filename that was playing, since with dvd-bend, I eventually rip all my files to the title of the show. The problem I ran into was I couldn’t figure out how to get it to display the filename. Here’s how, though: just map the command to osd_show_property_text “${filename}” in your LIRC rc file.

Here’s an example from my ~/.mplayer/lircrc that I added:

prog = mplayer
button = green
config = osd_show_property_text “${filename}” 500

In the case above, my StreamZap USB remote has four colored buttons on the bottom, and I have an event press called ‘green’. So when I press the green button, it tells MPlayer to display the filename. I added 500ms as an optional duration time, since the default is really short.

A picture is worth a thousand words, though, so here’s what it looks like on your display.

I should mention that I’m sure that there are lots of other variables you could display on screen, but I can’t figure it out. Actually, now that I think about it … Okay, I figured it out. Run mplayer -input cmdlist (by the way, I hope by now you’re running either SVN of MPlayer or a really recent snapshot, you always should), and at the bottom you’ll have a table called available properties. Just do the same command as above, putting the variables in the same format. Another example, would be to display the time position: osd_show_property_text “${time_pos}” I don’t know if they all work, but I tried about half a dozen and they all did, so go wild. :)

One last thing to mention … if you’re just using the keyboard, press capital I to get the same thing.

Now if I could only get my Freevo + MPlayer + LIRC issues solved, I’d really be good to go .. I’ll have to post another time on my issues / updates with that arena, though. For now, it’s fun enough just to get MPlayer decked out. :D