Linux & HDTV

A current snapshot (Jan. 2012)


The time I’ve set up this Blog, I’ve decided to create an own page about hardware acceleration for Linux, since there haven’t been much changes over the past years. This page should be static and one of my four major pages at this Blog (Home, Linux & HDTV, Sitemap, About this Site).
Ironically, the time I’ve finished this static page about Linux and hardware acceleration, the development gained speed, and the situation right now it a bit difficult to describe. There are many approaches underway and some of them are already more or less usable.
This article intend to give a short impression of what is going on regarding Linux and hardware acceleration support for HD content (H.264).
The old page, that was originally on this place, was already degraded a few weeks ago from an page into a article.

HD playback with free software

First of all one should mention, that it’s not necessarily have to be hardware acceleration in order to play back HD content, such as AVCHD footage from your HD-camcorder or .mkv (Matroska; x264 encoded) content, which is nowadays usually used as the container format for high definition content (720p/1080p).
All you need is a decent single core CPU with approx. 3GHz and a resent mplayer. Check it out with subversion:

svn:// mplayer

After compiling and installing it (described more than once at this Blog), you can play Matroka by invoking this:

mplayer -vo xv -lavdopts threads=2:fast:skiploopfiler=all matroska-video-here.mkv

or for example the footage from your Canon camcorder HF100 (PAL) like this:

mplayer -vo xv -lavdopts fast:skiploopfilter=all -vf pp=fd -fps 50 canon-footage-here.mts

Don’t expect to run this solution above flawlessly. You may encounter frame drops on fast panning, or audio de-sync. I’ve managed to play Canon’s HF100 footage on a AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ (2,7GHz) with sometimes a slight audio de-sync only and have been using this solution for the last half year.

HD playback with CoreAVC (commercial)

In comparison to mplayer native support, CoreAVC has still the unique ability to utilize more than one CPU core. So it’s even possible to watch HD movie on a Dual Core 2GHz CPU with CoreCode’s sofware decoder CoreAVC (for Linux).

Hardware acceleration projects

Nvidia VDPAU

The project, which has the most usable state right now, is Nvidia’s VDPAU (Video Decoding and Presentation API for Unix) device.
It’s a closed source binary driver and was published in version 180.06 the first time on 14th of November 2008 ( Installation and usage is also described at this Blog. Coming from an stable Nvidia driver, no change to your xorg.conf is necessare, but you have to, in order to use it, patch mpayer or other applications like xine. Here’s a list of (all?) current project, which utilizes the HD hardware acceleration:

  • Mplayer-vdpau
    Nvidia first published a patch-set to the mplayer, which was also the first more or less working and usable application. Few days later the MythTV team provided an improved patch-set based on Nvidias previously published patches. This made VDPAU almost ready to use.
  • MythTV
    As mentioned before, the MythTV team was one of the first teams which utilizes Nvidia’s VDPAU and improved it noticeably. This of course found its way directly into MythTV itself (development version)
  • Xine-vdpau
    The xine-vdpau project has a completely different approach. They intend to be open, and do not rely on Nvidia’s work, but started an own code-base. The only thing, that is currently supported, is Mpeg transport stream in all or some of its incarnations, like .ts/.mt (DVB-S2).
    Xine-vdpau is based on the xine-lib 1.1.16 (FIXME) branch and is not compatible with xine-lib-1.2 (hg).
    The application, that can make use of this library, is the Xineliboutput/vdr-sxfe plugin for VDR. Although reported on different forums multiple times, that it’s quite usable, I wasn’t successful and didn’t succeed in making it work for me.
  • Xine-lib-1.2
    Xine-lib-1.2 lives at the moment only in the development branch (hg) and is considered as experimental, but is quite stable, and I’m using it already for more then one year. The interesting part about that is, that Reinhard Nissl provides a patch (xine-lib-1.2-vdpau-rxxx.diff.bz2) on a current basis, which adds xine-vdpau functionality to xine-lib-1.2. The application that can make use of it, is vdr-xine plugin for VDR and is the only application I was able to use successfully (relative term!) with VDR.
  • Update Jan. 2012: VDR-Plugins xine and xineliboutput
    Both working pretty stable with VDPAU for quite a time now and can be called stable, at least concerning VDPAU
  • VLC
    It is said, the VLC (Video LAN Client) project is also integrating Nvidia’s hardware acceleration in their famous media player. I’m not into it, and have this info from here:
  • Other
    Since the VDPAU patches are mostly against ffmpeg, it’s very likely all project using it, will be able to use it. I’m pretty sure the XBMC project will come up with an working and usable version soon.

4 thoughts on “Linux & HDTV

  1. Hi there, I’m gathering info about setting up VDR and a stumbled across your blog and started reading some of your posts. There is some good information here for sure. I’m curious if you are using mythtv and or VDR with dvb cards and if so, do you happen to know of a good howto for VDR. I see you have one for VDPAU however I am looking for one without that. I’m quite familiar with setting up mythtv and dvb however VDR has always eluded me due to the lack of decent howtos out there. If you know of any, would it be possible for you to fire me a quick email and point me in the right direction? I thank you in advance for your response and hope you continue writing these informative articles.

  2. @Terry
    Well, there are a lot excellent HOWTOs to VDR out there, but most of them are in German language.
    I’m running VDR for about 5y now and don’t need an HOWTO anymore, so let me look first.

    Oh, wow! is alsa available in English:

    This is site is excellent, and cover almost every aspect of VDR.

    To get started with VDR on Debian systems you need to perform a
    apt-get install vdr
    building it from source you need to install the DVB driver first:

    Then the VDR itself:

    Both links are located in the first link in this post. Look on the start page of the wiki for “Software” -> VDR ->”Basis”

    It’s really not much to it. But take your time – there some configuration to do (channels.conf, disecq.conf, remote.conf (lirc+keyboard))

    Some plugins also need time to understand and to configure sometimes.

    Please consider, that VDR is excellent but old DVB frontend. The OSD is a bit poor. That’s way I’m using it behind a stylish surface, the My Media System.
    Here’s the complete story:

    If you want to fuse both systems, this is the page:

    Btw: I’ve also tried MythTV (not only once), but came back to MMS again and again. (Same for Elisa and XBMC)

    Have fun.


Comments are closed.