View Full Version : How to use new MPEG acceleration feature
sw25481
05-13-03, 02:04 PM
The latest readme says that the Nvidia drivers support hardware MPEG acceleration under Linux on GeForce 4 and FX cards. Does anyone have any idea how to use this. I am considering purchacing one of the cards that supports this for a system that would not otherwise be able to play DVDs and MPEG2 video streams.
Thunderbird
05-14-03, 08:56 AM
Mpeg2 acceleration is provided using a library called XvMC (don't confuse it with Xv since it is different). To use the acceleration you need to use a media player with XvMC support. I know that Xine was looking into this some time ago not sure about the status now and if there are other big players that support XvMC yet.
(xinelib based players will support it too then ..)
jaaason
09-23-04, 02:20 PM
An update for others, since I just researched this...
xorg 6.7.0 supports XvMC, and XFree86 4.4 probably does. Check for a file named libXvMC.* in /usr/X11R6/lib. When you run X and XvMC is enabled, you will see this in /var/log/Xorg.log.0:
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
I believe this is only supported in the nvidia driver, not riva.
My goal was to use xvmc in mplayer. I had to configure with special options:
./configure --enable-xvmc --with-xvmclib=XvMCNVIDIA
Make sure it says xvmc video output is enabled when running configure. You must have a file named libXvMCNVIDIA.so* in /usr/X11R6/lib, which I guess is put there by the nvidia driver. If your file is somewhere else, you may have to modify your library path or change the configure option. configure.log may help you. Make and install mplayer, and run it with -vc ffmpeg12mc. It should automatically use xvmc output, but you may need -vo xvmc. Like this:
mplayer test.mpeg -vc ffmpeg12mc -vo xvmc
On my Pentium III 800 with nVidia GeForce FX5200 PCI 128MB, I saw the cpu usage reduce from 80-90% down to 40% when playing a 720x480 mpeg-2 with 4Mbps bitrate on a tv at 800x600.
Cartman
09-23-04, 02:37 PM
On a side note --with-xvmclib=XvMCNVIDIA is unneeded. Mplayer's default is NVidia XvMC library.
PrakashP
09-24-04, 01:39 AM
Unfortunately with a Geforce4 Ti 4200 using xvmc isn't good. I get about 32% CPU with 1,375GHz Athlon XP CPU, but using xv I get about 20% CPU...
With HDTV content I get >100% CPU (ie partial stutteringw) with xvMC and about 70% with xv.
Thunderbird
09-24-04, 07:00 AM
There's only some limited XvMC support in Geforce4Ti cards. For full support you need a Geforce4MX/GeforceFX or better.
"GeForce4 MX and GeForce FX products support both XvMC's "IDCT" and "motion-compensation" levels of acceleration. GeForce4 Ti products only support the motion-compensation level. AI44 and IA44 subpictures are supported. 4:2:0 Surfaces up to 2032x2032 are supported."
PrakashP
09-24-04, 07:29 AM
Yup, I know that GF4Ti has no iDCT, but I though using hw mc would offload the CPU, which isn't the case...
Another question:
Does GF4 (or higher?) support deinterlacing by hw? I remember in Windows the Deinterlacing Quality of my gf4ti was better then of my gf2 gts. Of course I have no evidence, but it is what I remember what sruck me when i upgraded.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.