MPlayer for maemo

Using maemo MPlayer in slave mode.

MPlayer has support for slave mode in which it works as a backend for other programs. Information about how to enable it can be found in mplayer documentation. Detailed description of all the available slave commands is here:

If you want to use mplayer as a backend for your Nokia 770 GUI application, the best solution is probably to use -vo nokia770 video driver in framebuffer overlay mode as described on this page.

Next comes some step by step example of running mplayer in slave mode on Nokia 770.
  1. Download and install maemo mplayer (tested with version mplayer_1.0rc1-maemo.6) 
  2. Connect to your device using ssh
  3. Start standard Nokia 770 video player, it will not be really used as a player in this example but will serve as a decoration only :)
  4. Run mplayer -nofs -vo nokia770:fb_overlay_only:x=174:y=60:w=600:h=360 -quiet -idle -slave from your ssh session
  5. Type loadfile /home/user/MyDocs/.videos/Discovery.avi command in the console to start playing Discovery video clip, an interesting thing here is that it will play in the same rectangular area that is used for video by the standard video player, though mplayer is actually used as a backend!
  6. Type seek 50 1 command to seek to 50% of this clip, any other value can be used to navigate to any part of the movie easily
  7. Type get_percent_pos command to get the current position in percents any time when the video is being played (this information can be used to update progressbar in a GUI frontend).
There are many different commands supported in slave mode, you can load any media files (both video and audio), freely seek to any place, get current position any time, set playback to pause, etc. Also it is possible to switch to fullscreen and back. The example above shows that it should be possible to develop mostly exact clone of the default video player using mplayer as a backend. You will only need to bind GUI controls to mplayer slave commands to make it work.

One thing that may cause problems is that mplayer constantly renders video into some screen area unless stopped or paused. So it the user decides to swith to some other application, mplayer will still render video over it. In order to prevent this, frontend should track this situation and immediately issue pause command to mplayer.

That was some basic information that should be enough for developing GUI frontends for MPlayer on Nokia 770. Probably it is still incomplete and does not cover all the possible problems that may be encountered. Also probably MPlayer still requires some modifications that may be needed to simplify GUI frontends development, don't hesitate to contact us if you encounter any issues or need some assistance.

Support and useful links

Discussion about MPlayer in the forum: