Up Up Home Home

Using BoxStar with VDR

VDR is the leading DVB (digital TV) application for Linux, being a full PVR/DVR:- the only one designed around DVB from the start. On its own it only really works well with "full-featured" DVB cards ie ones with an onboard MPEG decoder with TV-out. Fortunately it has an output plugin so that xine can be used as its viewer, and it can be controlled over a network (or by other programs on the same PC) with its SVDRP interface. This means it's possible to use boxstar as a front-end to launch xine while controlling VDR; so you only have to configure your remote control for the one program. If you want to do watch some other video with boxstar's MPlayer interface, you can do so while VDR is still running in the background; important for timed recordings, EPG scanning etc.

I can't really help with installing VDR because I've been using it for ages and have frankly forgotten what I initially did to get going. Here are some observations for what they're worth though:

Unless you have a full-featured card or a DXR3 card or similar MPEG decoder card, I recommend using one of VDR's xine plugins to allow this daemon-like usage and because none of the other plugins I've tried achieve satisfactory A/V sync. This used to mean only the xine device plugin from http://home.vrweb.de/~rnissl/ and a patched version of xine, but there is now an alternative: xineliboutput. xineliboutput can be configured either to display VDR by itself or to act as a server for client players to connect to. Of course a client and server can be on the same machine so this is great for boxstar. The plugin package includes its own players or you can use a patched version of xine. I now run the xineliboutput plugin with the options: --primary --local=none --remote=37890 and use vdr-fbfe (see below) as the player.

The good news for Debian users is that there are packages for VDR, its xineliboutput plugin (vdr-plugin-xineliboutput) and the plugin for xinelib to play it (libxine1-xvdr) as well as xineliboutput-fbfe and xineliboutput-sxfe.

Configuring boxstar for VDR

Simply adding a <vdr> tag to boxstar's config enables the VDR interface, adding an entry to the top-level menu. There are several sub-options descibed in the config reference. Please read this section! And also look at the example.

Setting up vdr-fbfe

One of the viewing front-ends supplied with the xineliboutput plugin is vdr-fbfe, for use with DirectFB; this is what I use with the TV out on a Matrox G450 card. My <vdr><viewer> command line is vdr-fbfe --aspect=16:9 --fullscreen --nokbd which I think is self-explanatory. There is no need to tell it where to connect to the VDR stream; it scans for it automatically. To ensure correct operation with my Matrox card's TV-out I edited ~/.xine/config_xineliboutput to include these lines:

video.device.directfb_field_parity:top
video.device.directfb_vsync:1
video.device.directfb_layer_id:0

df_xine

I used to use the xine device plugin but switched to xineliboutput because it's better supported and more flexible. Before switching I used to use df_xine, which is a version of xine for DirectFB. I'll keep my set-up notes here; they may come in handy. df_xine is in the DirectFB-extra package which I had to download and compile from source. My <vdr><viewer> command line was df_xine -a 5:4 -l 0 -s -f top vdr:/tmp/vdr-xine/stream#demux:mpeg_pes.

-a 5:4

I've always found it a bit daft that you can only tell xine the aspect ratio of the video you're watching (which it should be able to deduce), but not the aspect of your screen. Well, you can give it this information with some options in your X configuration, but I wouldn't have thought that works with framebuffer versions. Besides, some screens change shape depending on what mode they're in, which means the X config would have to be overridden. My solution is to pretend that whatever I'm watching has the same aspect ratio as the screen (5:4 = 720:576) so that df_xine plays it full-screen. All DVB is either 4:3 or 16:9 and my TV can switch between the two, so this works fine. 4:3 TVs may prove more difficult to support, but if the TV doesn't support aspect switching you just might be able to get away with it by configuring VDR to crop widescreen programmes.

-l 0

Makes sure df_xine uses the TV-out on my Matrox card's second head correctly.

-s

Sync to the vertical retrace.

-f top

Ensure correct playback of interlaced programmes.

vdr:/tmp/vdr-xine/stream#demux:mpeg_pes

The URI for xine to find the output from VDR's xine device plugin. Alternatively you can use xvdr://localhost:37890 for xineliboutput.