How to install video drivers for the CN400 northbridge
I am the owner of one of those fantastic VIA Epia SP8000 motherboards, passively cooled (there is absolutely no fan in the case and the power supply is passively cooled - see the article about the "Soundstation"), which already has on-board all the components needed by a media center.
I am writing this guide because I needed a lot of time figuring out how to make HD-video work.
First of all you have to know that X comes with "via" drivers that already support the CN400 northbridge. You will get hardware-accellerated mpeg2 and mpeg4 (h264 excluded) up to resolutions to about 800x600.
The problem for me was that each time I wanted to watch HD-videos, the video was displayed with a funny "mirror" effect on the sides of the window - this is quite difficult to explain, but the center of the video was ok, while the bands/sides had a kind of "macro-interlaced-mirror" effect, kind of "stripe"-effect. Well, hope you got the idea.
As I said this problem does not occur if the video has a smaller resolution than ~800x600.
So, if you would like to watch HD-Video using the CN400 you should first download the drivers provided by the OpenChrome project, configure and install them, download the Mplayer source files and its patch provided by OpenChrome, apply the patch to Mplayer, configure it, change the xorg.conf configuration and use special commands to make Mplayer play a video.
This sounds like a lot of work, but I think this can be accomplished in about 40 minutes. Here are the details:
- Download the X drivers provided by Openchrome.
svn co http://svn.openchrome.org/svn/trunk openchrome
- Go to the directory openchrome which was just created and type in there...
./autogen.sh
./configure --prefix=/usr --enable-maintainer-mode
make
make install
- Time to change your xorg.conf file. You probably have in there the entry...
Driver "via"
Driver "openchrome"
- Now X should be using the openchrome drivers. Do a modprobe -r via if you already started up X previously to unload the via-drivers (do this before starting up X).
- Now you're ready to fiddle around with MPlayer. In my case I went here and downloaded the Cumulative mplayer patch for Mplayer-1.0_rc1. Perhaps in the future you'll be able to get a newer one.
- As I had the patch for the version 1.0_rc1, I went here and downloaded exactly that version.
- Unpack and untar the MPlayer version you downloaded, go one level above the newly created directory and apply the patch to the source code as follows:
patch -p0 <mplayer_xvmc.diff - Once the patch has been applied jump into the direcotory of MPlayer and ./configure --enable-xvmc --with-xvmclib=XvMCW and make as usual.
- Now that MPlayer has been compiled, start up X if you didn't yet and try to play a video with the following command:
./mplayer -vo xvmc,xv -vc ffmpeg12mc, myfancyhdvideo.avi
Mpeg2 videos should generate ~5% CPU load, mpeg4 (divx, xvid, mpeg4) should generate ~50%. h264 is not supported - you'll have to transcode the video. mpeg4-hd (divx, xvid, mpeg4) should run just fine in 720p. Forget mpeg4 1080p. Still have to try out mpeg2 720p/1080p.
Links:
My motherboard
Installation instructions for Gentoo
MPlayer download
OpenChrome instructions for MPlayer
OpenChrome patches for MPlayer
Openchrome X drivers