Tuning Freevo: display feedback when manually seeking

There is a nice feature in Freevo that allows one to seek the currently playing movie to any given position. One just needs to press 0 on the remote control, then enter to which minute of the movie they wish to jump and press enter. For instance, pressing 0,6,0,ENTER would fast forward the movie to the first hour. Unfortunatelly, there is no visual feedback while pressing these keys. I thought it would be nice to see „Seek to:” in mplayer’s OSD when first pressed 0 and then see „Seek to: 6”, „Seek to: 60” while pressing next buttons.

I managed to do it in this way (source code editing necessary):

1. Went to the /usr/lib/python2.4/site-packages/freevo/video/plugins directory.

2. Opened up the mplayer.py file in text editor.

3. Found a line saying: def eventhandler(self, event, menuw=None):

4. Ten lines below def eventhandler there is a line saying:

if event == VIDEO_MANUAL_SEEK:

5. After that line there is

rc.set_context('input')

just add that line:

self.app.write('osd_show_text "seek to: "\n')

below the rc.set_context line (self.app.write should be left aligned with tabs the same way rc.set_context is).

6. Further in the file there is a line saying:

self.seek = self.seek * 10 + int(event)

just add the line:

self.app.write('osd_show_text "seek to: ' + str(self.seek) + '"\n')

below the self.seek line (self.app.write should be left aligned with tabs the same way self.seek is).

7. Saved the file, restarted Freevo and voila!, it’s almost working (I don’t know how to make it not disappear after a second, but it does give visual feedback).

Tuning Freevo: subtitle and audio language switch

I decided that posts in the Freevo category will be published in English so the target audience can be wider.

Freevo is a HTPC (Home Theatre Personal Computer) overlay for some of the most common Linux multimedia applications (mplayer, xine, etc). It is visually and functionally similar to the Microsoft’s Windows XP Media Centre. I have made a PC box of some old components that where scattered arround in my cellar, installed Ubuntu Linux there, tweaked A LOT to make it work with things like TV-OUT and remote control and finally installed and configured Freevo. It allows me to watch virtually any kind of movies (DVD, DIVX, XVID, MKV, WMA, MPEG, etc.), play a collection of my MP3 files, browse my photographs and much more. Thanks to a huge hard drive (250GB) I could put practically whole multimedia content on the box.

In my first post I would like to give You some tips and tricks to enable features that aren’t normally available in Freevo (as of version 1.5.4).

O.K., let’s get going 🙂 The very first thing that I didn’t like about Freevo was it’s unability to select different subtitles using my remote. It was especially annoying when watching MVK movies that have some subtitles (eg. English and French) encoded inside the video file. Mplayer or Freevo automatically selects embedded subtitles and ignores the fact that there also exists a specially prepared Movie_title.txt file with Polish (my native tongue 😉 ) subtitles.

So what needs to be done to fix that problem is this:

1. Make sure You have some remote control button configured and not used for anything in video context. Open up /etc/freevo/lircrc file and one of the sections could be something like this:

begin  
prog=freevo  
button=subtitle  
config=SUBTITLE  
end

2. Open up /etc/freevo/local_conf.py file and seek for a line

# EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100')

I’ve added two lines below:

EVENTS['video']['SUBTITLE'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_select')  
EVENTS['video']['LANG'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_audio')

The first one makes the SUBTITLE button cycle through all available subtitles during the movie. The second line makes the LANG button cycle through different available versions of audio. I find it useful when watching DVDs where default language often is different than my native.

Yes, that is SOOO easy 🙂