This is an Installation HOWTO for VDR with HDTV support for Lucid Lynx (Ubuntu 10.04 LTS).
I’m starting VDR from inside MMS (My Media System, a lightweight media center for Linux [wiki][forum][bug]), so it’s actually a HOWTO about installing a whole Media Center PC (HTPC).
I’m still using MMS, and not XBMC, MythTV or Elisa because I like it slim, fast, reliable. Especially my kids, wife and my mother must be able to use it without any problems.
Prerequisites
You need a Lucid (K)Ubuntu(-server) already installed. This won’t be described here. I’m using a x64 system with an AMD Athlon 5050e and a onboard Nvidia 8200, and also have a running MMS and VDR on Intel Core 2 Duo CPU E7300 @ 2.66GHz with an Nvidia GT 8500. You definitely need a Nvidia graphics cards >= 8200 to be able to make use of HD hardware acceleration (VDPAU).
The AMD system needs a workaround with cpupowerd
for a C1E power state quirk to make it work smoothly though.
I’m using DVB-S2 3200 Technotrend (same as Technisat Skystar HD) satellite cards.
MMS
The configuration of MMS won’t be in my scope here either. If you want to try it, add this PPA repo into /etc/apt/sources.list.d
:
deb http://ppa.launchpad.net/mms-prodeia/ppa/ubuntu lucid main deb-src http://ppa.launchpad.net/mms-prodeia/ppa/ubuntu lucid main
Afterwards do a:
aptitude update aptitude install mms mms-plugin-audio mms-theme-midnight mms-input-keyboard mms-output-sdl mms-plugin-movie mms-plugin-movie mms-plugin-game mms-plugin-picture mms-plugin-picture mms-plugin-weather mms-plugin-clock
. Read here [1] for a detailed package overview. And here [2] about the latest updates.
I will drop a line about the config string for the vdr-sxfe
in the /etc/mms/TVConfig
file later. Start MMS by typing mms
in your command line, or hit Alt+F2 and type mms
there. (/etc/mms/Config
is a good place to start the configuration. E.g. the resolution)
Nvidia driver
Lucid is different!
If you used to install and remove your proprietary Nvidia-Vdpau driver automatically or manually, then you will be confused the first time trying to make Nvidia drivers work with Lucid. And you definitely need Nvidia proprietary drivers to make VDR work with HDTV support, and not the default nouveau
driver, which is shipped with Lucid now. First, we need to blacklist the nouveau
driver, and whitelist the nvidia-current
driver. Go therefor into
/etc/modprobe.d/blacklist.conf
or blacklist-local.conf
and comment out by adding a leading # to the
blacklist nvidia-current
line, and add the
blacklist nouveau
line into that config file. Either you have blacklist.conf
or blacklist-local.conf
depends on your previously installed video drivers, respectively whether you have had installed the proprietary Nvidia driver already or not. Either way – you will end up with nouveau
, and that’s what you don’t want.
Now install the Nvidia proprietary driver:
aptitude install nvidia-current-dev nvidia-current nvidia-current-modaliases
Reboot now.
VDR, Libxine, DVB-DKMS Installation
I’ve been looking through the different PPA repos, and decided to use the yaVDR (aka the-vdr-team). They use libxine2 and do also have the new Dynamic Kernel Module Support (DKMS) for the new experimental V4L-DVB drivers from Liplianin. All is available for Lucid, 32 and 64bit.
In my eyes libxine-vdpau, based on version 1.1.6 from late 2008 isn’t recommended anymore. For the new Xine-Lib 1.2 hg there’s no more Mr. Nissl patching needed (last one was Nr. 286) anymore, because VDPAU support is now integrated since the 15th January 2010.
Thanks to Mr. Liplianin, who brings us the newest V4L-DVB experimental driver, you can also use new DVB-S2 Twincards like the Mystique SaTiX-S2 Dual Low Profile or other [3].
User also reported occasionally a faster zapping behavior, when switching from one channel onto another. For my Techonotrend S2-3200 it’s more a matter of video_buffer
settings, than due to the libplianin driver, but find out yourself. [UPDATE]I could reliably reproduce much faster channel switching (zapping|Umschaltzeiteten) with the new Liplianin drivers, even with same buffer settings. (2010-06-03)[/UPDATE]
Buffer (video) settings around 5000 leads definitely to ultra slow switch time between channels, no matter which DVB driver you are using.
Ok, enough talk, let’s install. Add the yaVDR repo into your /etc/apt/sources.list.d/yavdr-vdr-testing.conf
file:
deb http://ppa.launchpad.net/yavdr/testing-vdr/ubuntu lucid main deb-src http://ppa.launchpad.net/yavdr/testing-vdr/ubuntu lucid main
I’ve installed the new DVB drivers first, so actually I don’t know whether they are mandatory for xine-lib 1.2 or not. If you leave out this step and your xineliboutput starts to core or to crash, install the Liplianin DVB driver, too.
aptitude update aptitude install s2-liplianin-dkms
The installation itself takes a good while, and the deinstallation even longer (>20min), so be sure about what you are doing, or be patient 😉
Now install Libxin, VDR, Xineliboutput plugin and the xineliboutput-sxfe remote client:
aptitude update aptitude install vdr vdr-plugin-xineliboutput xineliboutput-sxfe libxine-dev libxine2 cpupowerd
Configuration
We have to configure xineliboutput now, because with the default settings you’ll get a quite jerky HD playback. I’ve done these changes to my ~/.xine/config_xineliboutput
:
#cat ~/.xine/config_xineliboutput | egrep -v "(^#|^$)"
.version:2
audio.synchronization.av_sync_method:resample
video.output.vdpau_hd_deinterlace_method:bob
video.output.vdpau_skip_chroma_deinterlace:1
video.output.vdpau_display_queue_length:4
video.output.vdpau_deinterlace_method:bob
video.output.vdpau_sd_only_properties:noise+sharpness
video.processing.ffmpeg_choose_speed_over_accuracy:1
video.processing.ffmpeg_pp_quality:0
video.processing.ffmpeg_skip_loop_filter:all
video.processing.ffmpeg_thread_count:2
media.xvdr.num_buffers_hd:4000
media.xvdr.scr_tuning_step:150
engine.buffers.audio_num_buffers:500
engine.buffers.video_num_buffers:2500
engine.buffers.video_num_frames:50
engine.decoder_priorities.vdpau_mpeg12:1
engine.performance.memcpy_method:sse
Do the changes, while VDR isn’t running, else you risk to loose them. Not all lines are meaningful, but the buffer,vdpau,synchronization and deinterlace lines!
Either invoke vdr-sxfe like this:
vdr-sxfe --video=vdpau --verbose xvdr+tcp://localhost --buffers=2500 --height=1080 --width=1920 -fs --audio=alsa:default --post method:tvtime=use_vo_driver --reconnect
from the command line with the --post
switch in it, or turn this option on in your VDR xineliboutput plugin runtime config.
You can also use the above command line in MMS’ /etc/mms/TVConfig
file, where you have to provide
tv_path=/usr/bin/vdr-sxfe
and
tvopts = --video=vdpau --verbose "xvdr+tcp://localhost:37890" --height=1080 --width=1920 -fs --audio=alsa:default --post=method:tvtime=use_vo_driver --reconnect
Optimization
-
If you suffer from stuttering or jerky playback, especially and peculiar for SD channels and you are using an AMD processor with a Nvidia 8200 onboard graphics, then you need to pinpoint the CPU frequency at (if possible) 2000MHz. Do this by invoking:
modprobe msr cpupowerd --freq "0|2000"
This turns of your CPU governor. Changing the CPU governor will disable
cpupowerd
as soon as the change has happened, so watch out.This all is due to a power state behavior, that is typical for AMD systems, because they clock down the bus speed also, if idle. This notorious C1E power state kicks in if the CPU is hardly needed. This is especially the case if you watch a SD (standard definition) video stream. Then the system isn’t only running at 1GHz, but also the system bus has been clocked down dramatically, so playback gets jumpy.
-
If you suffer from tearing, do not use composite.
Do this:nvidia-xconfig --no-composite
Hi 😉
Pls have a look here:
http://forum.mymediasystem.org/viewtopic.php?f=7&t=2827
Lg
Roman