Xine with XvMC hardware acceleration

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

Xine with XvMC hardware acceleration

#1 Post by tempestuous »

For VIA Unichrome, Intel i810, and nVidia GeForce4 (& up) graphics cards

The VIA Unichrome graphics cards found on Epia systems have MPEG2 acceleration hardware support, which can be enabled in Linux with dedicated drivers and media players.
First you need a Direct Rendering (DRI) graphics driver. For Puppy2 use MU's 3D-Control-Center - http://dotpups.de/dotpups/XServer/3D-Control-Center.pup
Discussion regarding Unichrome setup here - http://www.murga.org/~puppy/viewtopic.p ... 7&start=16

(http://dotpups.de/dotpups/XServer/3D-DR ... chrome.pup is ONLY for Puppy 1.0.4-1.0.9)

Without this driver DVD playback with Xine on an Epia/Unichrome system is terrible. 100% CPU usage and stuttering playback.

With the DRI driver installed DVD playback is quite good. Still 100% CPU usage but only occasional dropped frames. Turn off Xine's default deinterlace setting and the CPU usage drops to 85% and no dropped frames. This is almost acceptable as-is, but I decided to compile a media player with output plugin to support the Unichrome's VLD-XvMC (XVideo Motion Compensation) rendering library.

The OpenChrome MPlayer patch fails to apply properly to MPLayer CVS source (late January 2006) so I tried Xine version 1.1.1.
Xine's "xxmc" output plugin configured without a problem, but I couldn't configure gxine's Mozilla plugin. (edit: I probably needed Barry's Mozilla source)
So I used xine-ui as a frontend instead, with the separate mozilla-plugin.

Thanks to MU, here it is - http://dotpups.de/dotpups/Multimedia/Xine-unichrome.pup

So what's the result? Perfect DVD playback with a very modest 30% CPU usage.
If your CPU usage is significantly higher than this, you probably need to enable DMA on your DVD drive, like this -
hdparm -d1 /dev/dvd

And this version of Xine can be used with non-XvMC compatible graphics cards, too, without the acceleration feature of course. Just change the video output setting to xshm or auto.
Notably, this Xine version also supports MPEG4/AAC audio decoding with the FAAD plugin.

This package will not overwrite Puppy's gxine.
Launch Xine from the command line with "xine". The preferences are set up for xxmc video output. Audio output can be changed to ALSA if ALSA is installed.
DVD's can be played from the command line, fullscreen, without playbar, as such -
xine -V xxmc -f -I dvd://VTS_01_2.VOB

To use it in Mozilla, execute "run-xine" once, it copies the necessary plugin (this is done automatically, if you run it from the Dotpups-menu).
Last edited by tempestuous on Tue 18 Jul 2006, 01:02, edited 5 times in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

On my notebook (Celeron 2200) with SIS-graficschip (no DRI) it plays .mpg-videos fullscreen very fine without any configuration-changes. Just the menu is very slow, so I will stay with gxine when I don't need fullscreen.
Mark

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#3 Post by tempestuous »

Strange, unless your graphics chip supports XvMC this version of Xine should not play fullscreen video any better than Puppy's existing Gxine.
Did you choose "xvmc" or "xxmc" as the video output setting?

It suddenly occurs to me that other chipsets (apart from the VIA Unichrome) support XvMC / VLD-XvMC ... though I suspect a different version of the XvMC library will be necessary.
I will investigate the situation and report back.

And yes, the xine-ui menu has some strange behaviour.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

Gxine often crashes when switching to fullscreen due to a bug with Gtk.
The xine-ui does not.
I don't think the performance is better though, it seems to the the same as with the "xv"-driver (which is very good).
Maybe o slower CPUs you will see a difference.
Mark

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#5 Post by tempestuous »

Some investigation reveals that XvMC hardware acceleration was first developed for the Intel i810 chipset. Now the "OpenChrome" VIA Unichrome driver and proprietary nVidia drivers support XvMC as well.
There was formerly some XvMC support for Savage chipsets in older versions of XFree86, and ATi Radeon support is under development.

So this version of Xine should work for all 3 supported chipsets by selecting the "xxmc" output plugin, but the XvMCWrapper configuration file (/etc/X11/XvMCConfig) needs to be modified to link Xine to the correct chipset-specific XvMC library.
/etc/X11/XvMCConfig should contain just one line of text;
for VIA Unichrome - "libviaXvMC.so.1"
for Intel i810 - "libI810XvMC.so.1"
for nVidia - "libXvMCNVIDIA_dynamic.so.1"

Don't include the quotation marks, and take careful note of the correct case.
Of course, the relevant DRI graphics driver must be installed first. XvMC depends on DRI functionality.

What, then, is the generic XvMC library for? I believe this library is accessed by selecting Xine's "xvmc" (not "xxmc") output setting, and is for viewing the output of non-accelerated digital TV tuner cards. I can't test this.
And of course, a TV card will require a driver. This is a separate story!
Last edited by tempestuous on Sun 29 Jan 2006, 13:35, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

I added the i810-files to the Dotpup, with the last forummessage in the readme.
Mark

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

Wow! works great on my old nvidia card

#7 Post by Ted Dog »

I have a older nvidia card TNT RIVA128 this works great cpu dropped to nearly 50%

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

Still Wowed

#8 Post by Ted Dog »

This is really working well for my old card, better than ever! what would it take to make it happen in 109?

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#9 Post by dvw86 »

This is great! It worked wonders on my ML8000 Mini-ITX. I placed a link to this thread on the wiki Mini-ITX page.

http://puppylinux.org/wikka/MiniITX

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

WORKS ON 800MHZ LAPTOP!!!!

#10 Post by Ted Dog »

Sorry for shouting.
The combination of puppy2A7 (2.6 kernel one) and this ( xorg 1080x768 24bit) works very well on my laptop with cyberblade x1 graphics. best picture ever!! CPU runs at 45% with DVD playing.

Compaq 1200us laptop (2001)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#11 Post by MU »

I had to rename the Dotpup to avoid it gets uninstalled by Pupget (large first letter now):
http://dotpups.de/dotpups/Multimedia/Xine-unichrome.pup

Mark

gunsnwater
Posts: 1
Joined: Thu 27 Jul 2006, 16:36

#12 Post by gunsnwater »

Wow you are the best, Puppy has blown me away again. I figured I just didn't have the harwear to support full screen play back. two ".pup(s)" later and no problems. I couldn't be any more happy. I never would have gotten this fixed without the .pup files. I'm way too new to linux and isolated from linux users other then the net.
Thank You
CAB (gunsnwater)

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#13 Post by tempestuous »

Maybe try MPlayer-1.0pre8+XvMC as well -
http://www.murga.org/~puppy/viewtopic.php?t=9568
See which one you prefer.

Post Reply