homepage | forum | wiki | feature requests & bugs

Anders original Documentation

From Mms-wiki

Jump to: navigation, search

Contents

[edit] Mpeg Menu System Version 2 - The Complete Documentation

Version 1.2.4

This document is a complete documentation of the Mpeg Menu System Version 2. Mpeg Menu System Version 2 was originally designed as a menu system for the dxr3 card, but it has now grown into something more general. It currently also supports X and framebuffer output through SDL and VGAGL.


[edit] Introduction

Mpeg Menu System version 2 will often in this document be referred to as either Mpeg Menu System Version 2, Mpeg Menu System V2, mmsv2 or simply just mms. For a story of how these names came about look at the history section. This document has several functions. It is a complete documentation of the features in Mpeg Menu System Version 2 (mms). It gives you an install guide, explains how to configure mms and comes with a frequently asked questions (faq) section.

[edit] Authors

   Original Documentation: Anders Rune Jensen 
   Cut&Pasted into this Wiki: Andreas Saur

[edit] The history of Mpeg Menu System V2

The project Mpeg Menu System was started in the summer of 2002. It was started because at the time there was no Free Software projects that fulfilled my needs for a media system. My needs was a menu system for the dxr3 card which I could use to play music and watch movies. The only other system which was somewhat comparable in its features was vdr. I decided that changing vdr into what I needed was going to be a very ugly and probably be more time consuming than creating my own project. Since that time, two somewhat similar projects has appeared, freevo and mythtv. They are both PVR projects and started about the same time as mms was.

After having developed mms for about half a year it was becoming clear that the design did not scale very well to new features. This meant that mms was rewritten in the late 2002 and mmsv2 was released on 01-Jan-2003. The last version of mms was 0.54 and the first version of mmsv2 was 0.60. The reason not to start the version scheme from scratch was that mmsv2 0.60 provided the same kind of features as mms 0.54 did, it was just a much cleaner core. After mmsv2 was released, development speed increased. This resulted in a new release 1-2 times a month. The changes was mainly bugfixes and small feature enhancements. Noticeable improvements from other developers include framebuffer support by Luis.F.Correia, new config system by NVignot and five translations. Since version 0.80 was released the huge amount of releases died of, this was because the new features for 0.90 required some big changes that couldn't be incrementally added. This meant that the next version 0.90 was released 3 months after 0.80.

[edit] Installation

[edit] Installation Requirements

Before installing mmsv2 be sure that you have the following software packages installed. Please note to compile mms you also need the development version of many of these libraries (this applies especially to Debian). What is specified below is only for the core of mmsv2. For each of input, output and modules enabled refer to the requirements section of each one to determine what is required.

imlib2
GNU gcc
GNU autoconf

[edit] MMS Installation

Install the required libraries and programs depending on your needs (See Installation Requirements). Extract the MMSV2 tarball and run ./configure with your preferences. To get a complete overview of how you can configure mmsv2 use the command ./configure --help. After configuring run make in the mms directory. make install will install mms and put configuration files into /etc/mms/ and data files in /usr/share/mms/. It will not overwrite existing mms configuration files or data files. So if you're upgrading from an earlier version it's a good idea to check what has been changed in the configuration files and to just delete the /usr/share/mms directory so that you are sure to get the latest version of the data files. You can install configuration files to ~/.mms by running make install-user. When the documentation henceforth mentions files in the path /etc/mms you should instead use ~/ if you are configuring mmsv2 as a local user. After installing the software you should change mmsv2 to your needs by modifying the files (at least config and input-keyboard or input-lirc depending on your input device) in /etc/mms/ or ~/.mms to your needs. The files is pretty self-explanatory but if you need extra information just look in the next sections.


[edit] Input

The input device can be configured in two ways. You can either set it with the input keyword in /etc/mms/config or you can set it from the command line with the -i switch.

[edit] Structure of the input file

From version 1.0 mmsv2 now has an input file for each input device. This makes it easier to switch input device. The file is named input-keyboard for keyboard, input-lirc for lirc and input-evdev for evdev. The syntax of these are: "mode, command, key" for keyboard and evdev. Lirc defines another field, multiple key presses, which is used for keys like up and down to enable holding down the key for multiple key presses. The key value is the button on your input device. Modes are ordered in a hierarchical structure, meaning some commands will be used in several modules. The hierarchical structure is shown below:

Image:input.png

This structure allows commands to be shared between modules. It's very important that you don't define two commands to the same key within this hierarchy. Please note that from mms 1.0 you can play and control audio from everywhere as the picture shows. Mode in audio general means toggling playlist menu and playlist_mode is for changing to playlist selection mode where saved playlists can be loaded.

[edit] Keyboard

Keyboard controls are defined in /etc/mms/input-keyboard. You should modify this to your needs. You can use the normal alphabet and alphanumeric keys, furthermore it's possible to use the following keys:

 TAB
 ENTER
 SPACE
 BACKSPACE
 DEL
 INS
 HOME
 END
 PGUP
 PGDOWN
 ESC
 RIGHT
 LEFT
 DOWN
 UP
 F1
 F2
 F3
 F4
 F5
 F6
 F7
 F8
 F9
 F10
 F11
 F12

[edit] Lirc

Lirc controls are defined in /etc/mms/input-lirc. You should modify this file to your needs. You can use any key defined by your remote. Normally the keys available is listed in /etc/lircd.conf.

From version 0.91 and up it is required to manually start lircd before starting mms.

[edit] Configuration

no configuration required

[edit] Evdev

Evdev is a nice framework to access USB devices. This can be joysticks, mouses, even the small buttons on your camera.

The controls of the evdev are defined in /etc/mms/input-evdev. In this file you define all the buttons of your device.

You can use evtest from Vojtech Pavlick, which is provided with the linux-dvb project, to get the commands available for your device.

You get the commands by typing evtest /dev/input/eventX, where X corresponds to the number for the device number (usually 0).

Example output from the joystick Trust Sight Fighter Plus:

evtest /dev/input/event1
Event: time 1076425154.988695, type 1 (Key), code 288 (Trigger), value 1
Event: time 1076425155.116666, type 1 (Key), code 288 (Trigger), value 0
Event: time 1076425181.799802, type 1 (Key), code 289 (ThumbBtn), value 1
Event: time 1076425181.895780, type 1 (Key), code 289 (ThumbBtn), value 0
Event: time 1076425226.015744, type 1 (Key), code 290 (ThumbBtn2), value 1
Event: time 1076425226.175707, type 1 (Key), code 290 (ThumbBtn2), value 0
Event: time 1076425239.709245, type 1 (Key), code 291 (TopBtn), value 1
Event: time 1076425239.901205, type 1 (Key), code 291 (TopBtn), value 0
Event: time 1076425265.304578, type 1 (Key), code 291 (TopBtn), value 1
Event: time 1076425265.432545, type 1 (Key), code 291 (TopBtn), value 0
Event: time 1076425266.552345, type 1 (Key), code 292 (TopBtn2), value 1
Event: time 1076425266.680317, type 1 (Key), code 292 (TopBtn2), value 0
Event: time 1076425267.064253, type 1 (Key), code 293 (PinkieBtn), value 1
Event: time 1076425267.224220, type 1 (Key), code 293 (PinkieBtn), value 0
Event: time 1076425292.019703, type 3 (Absolute), code 6 (Throttle), value 232
Event: time 1076425292.051693, type 3 (Absolute), code 6 (Throttle), value 202
Event: time 1076425292.083686, type 3 (Absolute), code 6 (Throttle), value 186
Event: time 1076425292.211662, type 3 (Absolute), code 6 (Throttle), value 184
Event: time 1076425337.291448, type 3 (Absolute), code 0 (X), value 0
Event: time 1076425337.419419, type 3 (Absolute), code 0 (X), value 127
Event: time 1076425338.283263, type 3 (Absolute), code 0 (X), value -1
Event: time 1076425338.411239, type 3 (Absolute), code 0 (X), value 127
Event: time 1076425339.019130, type 3 (Absolute), code 1 (Y), value 0
Event: time 1076425339.147104, type 3 (Absolute), code 1 (Y), value 127
Event: time 1076425339.786985, type 3 (Absolute), code 1 (Y), value -1
Event: time 1076425339.914963, type 3 (Absolute), code 1 (Y), value 127

The names of the buttons are the codes described in the example above, eg. Trigger.

It's possible that you have to define Left/Right and Up/Down to be either "absolute" or "relative". In the example the buttons have been named respectively:

"A" "Trigger"
"B" "ThumbBtn"
"C" "ThumbBtn2"
"X" "TopBtn"
"Y" "TopBtn"
"Z" "PinkieBtn"

The vertical angle of "Throttle" has been defined as "ThrottleUp" and "ThrottleDown" and the horizontal and vertical direction is respectively defined as "XLeft", "XRight" and "YUp", "YDown".

To use evdev, you have to load the modules hid and evdev before starting mms.

[edit] Output

The output device can be configured in two ways. You can either set it with the outdev keyword in /etc/mms/config or you can set it from the command line with the -o switch.

You can in mmsv2 1.0 and later define the resulution that mms will run in. For dxr3 and dvb this option is only used to switch between 16:9 output (720x405) and 4:3 (720x540). But for other modules like SDL 800x600 and 1024x768 has also been tested.

[edit] Dxr3

[edit] Requirements

em8300 (cvs)
dxr3player (>= 0.5.0)

[edit] Configure

To configure the dxr3 you only need to set the "em8300setup_path" keyword to the full path of your em8300setup binary. The "tv_mode" keyword determines if you have a ntsc/pal tv (-n/-p), 16:9 (-w) or 4:3 (-o) and if you want analog (-a) or digital (-d) output. The "tv_mode" value will be passed to em8300setup.

[edit] Dvb

[edit] Requirements

A working dvb card configured at /dev/dvb/adapter0/video0

4.3. SDL 4.3.1. Requirements

[edit] sdl

[edit] Configure

SDL output can be configured to either fullscreen or window by setting the keyword "fullscreen" to either true or false.

[edit] VGAGL

[edit] Requirements

svgalib >= 1.9.13 (tested with 1.9.17)

[edit] Configuration

vgagl output only works in 24 & 32 coulor modes, it does not need any specific configuration. It may be configure to centered mode or to resize mode by defining resize_mode or center_image macros in source code.

[edit] Framebuffer

[edit] Requirements

Kernel configured with framebuffer. Please note that framebuffer output is not recommended, use SDL instead as it is much faster.

[edit] Mpeg

[edit] Description

Mpeg output is used to write the output of mms to an mpeg file instead of to a screen. This is mostly useful for testing.

[edit] Modules

[edit] General

The keyword "cdrom" and "cdrom_name" in the configuration file /etc/mms/config is used by every module. You can add several lines to define multiple cdrom drives. In the options you can choose between the different drives defined.

The keyword "shutdown_script" is if defined used to execute one last command before mmsv2 quits. Very useful for shutting down the machine when mms quits.

The keyword "idle_timeout" is used to define after how long without any input mmsv2 considers the user to be idle. This is used in different modules for example to enable an audio screensaver.

Search functionality is available for the modules: Audio, Movie and Pictures. It behaves differently depending on if lirc or keyboard is used as input. If lirc is used, the keys 0-9 are used to enter letters. Much like writing on a phone, the letters a,b, and c are bound to the first key, 1. The letters d,e and f are bound to 2 etc. You can furthermore choose between the searched elements with the search.next key. If keyboard is used as input, the whole keyboard can be used to enter the search string.

[edit] Audio

[edit] Requirements

if you use alsaplayer: alsaplayer (>= 0.99.76)
if you use xine: xine-lib

[edit] Configure

Alsaplayer is used as the default audio player. To use Xine as audio player, run configure with --enable-xine-audio. There are several parameters in the configuration file you have to set to configure the audio module.

[edit] Audio configuration parameters

Table - Audio configuration parameters
Keyword Description
alsaplayer_path Used to configure where the alsaplayer binary resides on your system. Only used when alsaplayer is configured as player.
audio_output_modeUsed to configure if you want digital output (-d) or analog (-a).
audio_output_typeUsed to select the driver for output. The available drivers are alsa, jack, oss, nas, sgi or sparc.
audio_devThe audio device. Defaults to /dev/dsp.
audio_modemmsv2 can be configured to two different audio modes. If "audio_mode" is set to both, audio has a two screens, audio add where you add files to the other screen, playlist. This is very useful if you have a very large collection of music. The other mode is if you set "audio_mode" to playlist then you will only get the playlist and it will be filled automaticly with files found in the folders specified.
audio_dirThis keyword can be used to select which directories mmsv2 looks for audio files in. You can specify as many audio_dir keywords as you like to use several directories.
filetypes_afiletypes_a determines which files is recognized as music.
internet_radioThis option is used to describe the internet radio stations you want to use. It consists of two values separated by a comma, the first value is the url to the radio station and the second one is the name of the radio station. Alsaplayer currently doesn't decode .pls url's to extract this information. Therefor you have to specify the two values manually instead of just the url to the .pls file. You can extract the information by downloading the .pls using wget and then looking in the file.
lcdSetting this will display audio information for the currently playing track on a lcd display.

[edit] Description

[edit] Random

mmsv2 features two basic shuffles, pure random and winamp random. pure random simply select a new song at random each time you press next. Winamp random works by generating a randomized list of the tracks currently in the playlist. When the user presses next it will select the next track in this randomized list. Furthermore if you manually select a song, it will not continue using that song as index in the randomized list, it will use the track that you where standing on before selecting a new track. This is done to make it more random instead of playing the same songs over and over. Please note that none of the random functions respect repeat - meaning that they will play forever.

[edit] Playlists

mmsv2 can save and load playlists to provide persistence between several mms sessions. mmsv2 will automatically save your currently playlist when you quit and load it when it starts again. You can also manually load and delete playlist from the playlists menu. To get to this menu you have to press the mode key for playlist_general.

[edit] Fancy audio

[edit] Requirements

taglib
sqlite (>= 2.8.0)
pcre (>= 4.3)

[edit] Description

Fancy audio is a port of imms for xmms to mmsv2. It provides metadata information from songs (id3, ogg comments) and can extract pictures from album directories. Furthermore it gives a third random function: intelligent random.

mmsv2 will automatically add new audio files to the database as you play them. But it is recommended to add all your files using the library builder (mms-library) found in the library-builder/ folder for better real-time performance. To build mms-library go to the library-builder directory, do a make clean followed by a make mms-library.

Pictures are automatically extracted from directories when you enter them. mmsv2 requires either only one picture in the directory or one of the pictures in the directory must end with -front, eg. artist_album-front.jpg.


[edit] Movie

[edit] Requirements

if you use mplayer: mplayer (cvs)
if you use xine: xine-lib cxfe (>=0.5)
if you use dxr3player: dxr3player

[edit] Configure

There are several parameters in configuration file you have to set to configure the movie module.

[edit] Movie configuration parameters

Table - Movie configuration parameters
Keyword Description
mplayer_path Used to configure where the mplayer binary resides on your system. You only need to define this if you use mplayer. See "xine_mode".
cxfe_pathUsed to configure where the cxfe binary resides on your system. You only need to define this if you use xine (cxfe). See "xine_mode".
mplayeroptsThe options used by mplayer.
cxfeoptsThe audio device. Defaults to /dev/dsp.
movie_modeYou can disable movie mode when in the configuration file by setting "movie_mode" to false.
dxr3player_modeThis keyword determines if dxr3player or xine/mplayer (see "xine_mode") should be used to play dvds.
xine_modeThis keyword determines if xine (cxfe) or mplayer is used to play movies.
audio_mode_[5d,5a,2]These three keywords will define the audio settings for the movie player.
movie_dirThis keyword can be used to select which directories mmsv2 looks for movies in. You can specify as many mov_dir keywords as you like to use several directories.
filetypes_mfiletypes_m determines which files is recognized as movies.


[edit] Pictures

[edit] Requirements

None.

[edit] Configure

There is two parameters in the configuration file you have to set to configure the pictures module.

[edit] Picture configuration parameters

Table - Picture configuration parameters
Keyword Description
picture_dirThis keyword can be used to select which directories mmsv2 looks for pictures in. You can specify the picture_dir keyword as many times as you would like to use several directories.
filetypes_pfiletypes_p determines which files is recognized as pictures.
idle_timetime in minutes to wait untill automatic thumbnail creation starts.


[edit] Electronic Program Guide

[edit] Requirements

None for just displaying an Electronic Program Guide XML file. To grab new versions of tv listings you have to install XMLTV.

[edit] Configure

You need only define one configuration variables for EPG and that is "epg_data" which points to the TV.xml file. The default value is /etc/mms/TV.xml. The TV.xml file has to be in UTF-8 format for it to display local characters like the german umlaut correctly. You can convert an ISO-8859-1 file to UTF-8 using the following command:

iconv -f=ISO-8859-1 -t=UTF-8 < TV.xml > TV.utf8.xml
.

By passing --enable-picture-epg to configure you can enable pictures in epg which is used to display pictures instead of channel names. A script is provided to automaticly download the icons, if they exist in the TV.xml file. The script is named fetch_channels.py and located in the tools directory. You need to place these in the configuration directory for it to work.


[edit] Frequently Asked Questions

[edit] Questions regarding translation

[edit] How do I translate mmsv2 to language X?

Go into the po/ directory and copy mms.pot to X.po. Then you can start to translate using the X.po file. When done you can send the X.po gzip'ed to the mms mailinglist: mms@sunsite.dk. Thanx in advance.

[edit] How do I update my translation of language X?

Go into the po/ directory and run

host:~# msgmerge --update X.po mms.pot

Your X.po file will be updated with the latest changes from mms.pot. After translating new strings and correcting fuzzy entries, send the updated X.po gzip'ed to the mms mailinglist: mms@sunsite.dk. Thanx in advance.

[edit] Some characters is not displayed correctly.

Translations should be in utf-8 format. You can convert them to this using:

host:~# msgconv X.po -t UTF-8 -o X.utf8.po

To check the encoding of a file use the command file X.po.

[edit] mmsv2 doesn't work in Russian

Russian uses a different charset than what is provided by the font included in mmsv2. You need to install a font that contains this charset. Arial.ttf does.


[edit] Other

[edit] I was wondering if mms could support X

Feedback is always welcome also feature requests. Be sure to look at the doc/TODO included in the tarball if the feature has already been suggested. To improve the changes of the feature been included be sure to argument really strongly about it or provide a patch that implements it :)

[edit] My TV overscans with the DXR3 as output

If the picture is larger than the screen then you can adjust it my changing a few values in the em8300 driver. The file that you need to open is modules/em8300_dicom.c. In there you will need to find line 34 which starts with struct dicom_tvmode. Then change the value that matches your output mode, recompile and reinstall the driver.

Personal tools