MMS and VDR

Integration of VDR into MMS with xineliboutput/vdr-sxfe and one remote control.

Video

This video demonstrates how seamless VDR can be integrated into MMS. Although one can't see it, the navigation is done with one remote control.

See how it's done

There are three places where changes and adjustments must be done. First you have to download and install xineliboutput, then you have to adjust MMS' config, and at last you have to set up a lircrc file for irxevent. Here are the details:

VDR

Basically one has to perform four tasks on VDR's side. These are:

Download xineliboutput here. Copy it into your VDR's PLUGINS/src directory of your VDR, and meet the dependencies this plugin needs to run. Now compile it, and don't forget to perfom a "make install" in the xineliboutput directory itself.

Now you have to put a line into your VDR startscript. Usually it's something like "runvdr". Here's the entry for the plugin:
-P'xineliboutput \
          --local=none \
          --video=xv \
          --remote=37890 \
          --post=tvtime:	method=Linear,\
				cheap_mode=1, \	
				pulldown=0, \
				use_progressive_frame_flag=1'
Please consicer: This is a single line splittet by backslashes. You can remove them, if you want to have an one-liner.

One little, but very important step, is to workaround the "No Signal" problem. If you start vdr-sxfe from MMS or you can start it also from your console, just to verify it works, you'll get the "No Signal" screen. You need to edit VDR's setup.conf file. This file is usually located in /etc/vdr directory. Open it and search for:

PrimaryDVB
Now increase the value you can see to the right, by one. If you have one DVB card in your system, you have to set it to 2. If you have two cards inside your machine, the value has to be 3 then. Xineliboutput is regarded as an additional device in your VDR, and the output is sent to this device now. If you don't adjust this value, your screen will stay black with the vdr-sxfe frontend.

MMS

There are three simple steps on MMS' side. Here there are:

Download MMS and compile it with these two additional options:

 ./configure --enable-lirc --enable-tv --your-options-here
 make && make install 
Now adjust your /etc/mms/config file. Add these two lines:
tv_path = /usr/bin/vdr-sxfe 
tvopts=	--post tvtime:	method=Linear,\
			cheap_mode=1,\
			pulldown=0, \
			use_progressive_frame_flag=1 \
			xvdr://127.0.0.1 \
	--lirc=/dev/lircd \
	--fullscreen

Remember: You don't need the backslashes, if you write the whole statement into one line.

OK, we're almost there. MMS would at this moment be able to start VDR from inside MMS, but there's a little thing left. You need to close VDR also. Since MMS can't close your VDR frontend for you, because MMS gave up the lirc control to VDR.

Lirc

You have to install and configure Lirc first. Here is an excellent site for Ubuntu, where the installation and configuration of Lirc is described. For those, who don't know what Lirc is: Lirc is a Remote Cotrol Software for Linux. You at least need a DVB/Capture card, that supports it, or a standalone IR transmitter for the serial bus. Here's what need to be done on lirc's side:

You need at least one working config. Use irw command, to verify your config. Now pick a key from your remote control, which you don't need. This key is going to be the key, which shuts down the VDR's frontend applications (vdr-sxfe) Now add the following into your ~/.lircrc.

begin
   remote = Remote_Name
   prog = irxevent
   button = Key_on_Remote
   config = Key Escape VDR
end

Note: Remote_Name is the name of your remote definition set. Use irw, the name to the right of your output is your Remote_Name. The Key_on_Remote is the key you've defined in your /etc/lirc/lircd.conf. Use irw, it's the ouput to the left of your Remote_Name. If you don't get it,here's how it looks on my machine using irw:

root@vulcan:/home/acme# irw
0000000000c6539a 00 up MMS2
0000000000c223dd 01 left MMS2
0000000000c203df 01 right MMS2
0000000000c6239d 01 down MMS2
                     |     |
                     |     Remote_Name
                     |
                     Key_on_Remote

Start irxevent ~/.lircrc now and test the whole stuff now ;-)

Roman Müllenschläder wrote an excellent overview about the different possibilities on how to integrate VDR into MMS. If your solution isn't among this discription here, read this thread.