LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-22-2009, 12:18 AM   #1
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Rep: Reputation: 176Reputation: 176
MPlayer with VDPAU support. For users with Nvidia cards


I just thought I would share this in case anybody hadn't heard about it. With Nvidia's never drivers they have implemented vdpau support. vdpau basically takes hi-definition video (720p, 1080p, etc) and passes off the processing to the video card gpu instead of your cpu thus freeing up your cpu for other tasks, this is especially useful for mythtv users and htpc's. Unfortunately I learned through trail and error that this is not as straight forward as I had hoped but now that I got it working I thought I would share my steps.

Before you start thought make sure you have a nvidia card that supports vdpau, here is a compatibility list http://www.mythtv.org/wiki/VDPAU#Supported_Cards I'm not sure how current this list is but basically any card from the geforce 8 and series and on should work.

1) Install nvidia's proprietary binary video driver. I am not going to write a howto for this since there are dozens of posts on the forums for this. Once this is installed and working correctly proceed to step two.

2) Ignore (deleted)

3) you need to recompile MPlayer for vdpau support, There are a few issues here that I have worked out that I want to explain first. I used the MPlayer slackbuild from the official release. However Slackware ships an older version of MPlayer than we need so we need to update the build to a newer version. Unfortunately I learned that the MPlayer developers have dropped there GUI support so building a newer mplayer will not have gui support, its ok we'll fix this in step 4. You can find a modified slackbuild here http://webpages.charter.net/daedra/MPlayer.tar.gz by default this will not build patented code, you need to enable patents "YES" to get support for patented code. Here is a post about the mplayer GUI http://lists.mplayerhq.hu/pipermail/...ne/061715.html

4) Now that we have a new MPlayer and installed working, we need to add a GUI. I am recommending gnome-mplayer because it works very well and you can also add on gecko-mediaplayer plugins to work with it, more on that later. To install gnome-mplayer you can just use the build over at slackbuilds.org, just make sure to change the slackbuild to use the newest version of 0.9.8. here is the link for gnome-mplayer http://slackbuilds.org/repository/12...gnome-mplayer/ and the source http://gnome-mplayer.googlecode.com/...r-0.9.8.tar.gz Once its installed launch the program either from command line "gnome-mplayer" or from your launcher. Were almost done we just to change a few options. Under preferences change video output to vdpau and audio output to alsa. Also under mplayer tab enable software volume control unless your soundcard has a hardware mixer.

Now download a test clip from here http://www.h264info.com/clips.html

If your using KDE then run "System Monitor", once the program is running then open "gnome-mplayer" and launch your downloaded test video. if your system monitor shows mplayer cpu usage at 10% or less then vdpau is working correctly, here is a screen shot of it in action, the pic looks wrong but it's just the screenshot http://webpages.charter.net/daedra/1.jpg

Before the cpu usage was around 40%, so as you can see thats a huge improvement.

5) (Optional) Once you have all the steps above working if you want you can now install the gecko-media player plugins, this is basically the mplayerplug-in package that is available in the Slackware /extra directory, however that has been depreciated for a while, the developer has switched to gecko media player plugin. I have made a slackbuild for the newest version available here http://webpages.charter.net/daedra/g...aplayer.tar.gz

Quick note = If you decided to install gecko-media package but don't want to use my build then just know that gecko will use the seamonkey libraries to build the plugin and install then to the seamoney plugins directory so it will not work with firefox, if you use my build you won't have this problem.


We'll thats all, if I missed anything or have any questions please let us know.

Last edited by Daedra; 10-22-2009 at 03:46 AM.
 
Old 10-22-2009, 01:01 AM   #2
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
I implemented vdpau using mplayer svn when i started using slackware13. i use smplayer as a front-end for mplayer.

* - i don't like gnome-mplayer.

- I customized pat's slackbuild from the DVD and recompiled mplayer.
Code:
./configure --prefix=/usr \
            --mandir=/usr/man \
            --confdir=/etc/mplayer \
            --enable-gui \
            --enable-menu \
            --enable-largefiles \
            --enable-vdpau \
            --disable-arts \
            --codecsdir=${CODECSDIR} \
            --win32codecsdir=${CODECSDIR} \
            --realcodecsdir=${CODECSDIR} \
            --language="${LANGUAGES}" \
            ${EXTRACONFIGUREOPTIONS} \
            ${DO_PATENTED} \
            2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
- I used the closed source nvidia driver <190.42>
- I used smplayer v0.6.8 (supports vdpau fully, doesn't need extra arguments against mplayer exec)

btw...good work on the tutorial, am sure people will find it useful.

EDIT: CPU Usage while playing 720p video = 1-3%
CPU Usage while playing 1080p video = 3-7%

Last edited by slackd; 10-22-2009 at 01:24 AM.
 
Old 10-22-2009, 01:42 AM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
good to know, I could never get it to work without the libvdpau package, are you using that? or did you get it to work without it?
 
Old 10-22-2009, 01:52 AM   #4
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
Quote:
Originally Posted by Daedra View Post
good to know, I could never get it to work without the libvdpau package, are you using that? or did you get it to work without it?
nope i did not use the libvdpau package.

There are three VDPAU (Video Decode and Presentation API for Unix-like systems) libraries:
*-The top-level wrapper (/usr/X11/lib64/libvdpau.so.x.y.z),
*- a debug trace library (/usr/X11/lib64/libvdpau_trace.so.x.y.z),
*- and the NVIDIA implementation (/usr/X11/lib64/libvdpau_nvidia.so.x.y.z).

Code:
sam@Sam:/usr/X11/lib64$ ls -l | grep libvdpau
lrwxrwxrwx   1 root root       13 2009-10-22 08:27 libvdpau.so -> libvdpau.so.1*
lrwxrwxrwx   1 root root       18 2009-10-22 08:27 libvdpau.so.1 -> libvdpau.so.190.42*
-rwxr-xr-x   1 root root     5016 2009-10-22 08:27 libvdpau.so.190.42*
lrwxrwxrwx   1 root root       25 2009-10-22 08:27 libvdpau_nvidia.so -> libvdpau_nvidia.so.190.42*
-rwxr-xr-x   1 root root  1458192 2009-10-22 08:27 libvdpau_nvidia.so.190.42*
lrwxrwxrwx   1 root root       24 2009-10-22 08:27 libvdpau_trace.so -> libvdpau_trace.so.190.42*
-rwxr-xr-x   1 root root    49896 2009-10-22 08:27 libvdpau_trace.so.190.42*
did u read :this:

Last edited by slackd; 10-22-2009 at 01:55 AM.
 
Old 10-22-2009, 01:58 AM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
Thanks for that, I going to go back and look at this, if it works without libvdpau then whats the point of that step. Thanks for the heads up.
 
Old 10-22-2009, 02:04 AM   #6
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
the libs came automatically with the nvidia driver. i did not use a single extra package. try the latest .run from nvidia.

hey!..i just remembered..get the ffmpeg package with vdpau support. (kudos, Eric!)
Code:
ffmpeg: updated to r20056 snapshot (20090927). The x264 and gsm codecs were
  updated to their latest version as well. This ffmpeg has support for VDPAU
  (gpu-accelerated video decoding on recent Nvidia hardware) but I have not
  tested that.
   Note: as usual, this package comes without the patent/license encumbered
  LAME and FAAC libraries (meaning, you can not encode mp3 or aac, but you can
  playback these formats). Just rebuild the package and those will be
  automatically added.
 
Old 10-22-2009, 02:18 AM   #7
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
Your right, I upgrade ffmpeg using Eric's slackbuild and it worked without using the libvdpau package.
 
Old 10-22-2009, 02:39 AM   #8
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
Thumbs up

Congratulations! Buddy, Enjoy now!..

remember to disable Composite by running nvidia-xconfig utility.

Code:
sam@Sam:~$ cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder58)  Wed Sep  2 03:36:10 PDT 2009


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/lib64/X11/fonts/misc/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/100dpi/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/75dpi/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/misc/"
    FontPath        "/usr/lib64/X11/fonts/Type1/"
    FontPath        "/usr/lib64/X11/fonts/Speedo/"
    FontPath        "/usr/lib64/X11/fonts/100dpi/"
    FontPath        "/usr/lib64/X11/fonts/75dpi/"
    FontPath        "/usr/lib64/X11/fonts/cyrillic/"
    FontPath        "/usr/lib64/X11/fonts/TTF/"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "RenderAccel" "True"
    Option         "NoRenderExtension" "False"
    Option         "AllowGLXWithComposite" "True"
    Option         "MultisampleCompatibility" "True"
    Option         "AddARGBGLXVisuals" "True"
    Option         "MultiGPU" "Auto"
    Option         "Coolbits" "4"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Disable"
EndSection

Last edited by slackd; 10-22-2009 at 02:41 AM.
 
Old 10-22-2009, 02:46 AM   #9
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
cant do that, I like my compiz fusion too much .
 
Old 10-22-2009, 03:11 AM   #10
vinegaroon
Member
 
Registered: Sep 2008
Posts: 99

Rep: Reputation: 21
Thanks for this. I've been meaning to get this working.
 
Old 10-22-2009, 03:51 AM   #11
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
Quote:
Originally Posted by Daedra View Post
cant do that, I like my compiz fusion too much .
ok..i see.

actually when i used xfce i had tearing issues with the display compositor and i had to set it to "enable". now that i use fluxbox, i set it to "disable".
 
Old 10-22-2009, 04:04 AM   #12
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by slackd View Post
ok..i see.

actually when i used xfce i had tearing issues with the display compositor and i had to set it to "enable". now that i use fluxbox, i set it to "disable".
Did you have vsync enabled?
 
Old 10-22-2009, 04:11 AM   #13
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
Quote:
Originally Posted by Daedra View Post
Did you have vsync enabled?
yes, but that did not solve the problem. then i turned on composite.
that reduced the tearing significantly, but i finally solved it by turning off the compositor that comes with xfce.

the problem went away completely when i started using fluxbox, i couldn't care less about xfce now.

**however, i never had the problem in kde4 & compiz**

Last edited by slackd; 10-22-2009 at 04:18 AM.
 
Old 10-22-2009, 04:41 AM   #14
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
It seems that when I build mplayer it automatically enables vdpau, I didn't have to tell it anything.
 
Old 10-22-2009, 04:56 AM   #15
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,216

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by H_TeXMeX_H View Post
It seems that when I build mplayer it automatically enables vdpau, I didn't have to tell it anything.
I'm pretty sure your right, the reason I edited the build myself is because of the info I got in this post. http://www.linuxquestions.org/questi...mpile.-757310/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMPlayer & VDPAU londy Linux - Software 0 06-27-2009 08:49 PM
Tv tuner cards with linux support? ono.marian Linux - Newbie 1 06-17-2009 03:04 AM
LXer: A NVIDIA VDPAU Back-End For Intel's VA-API LXer Syndicated Linux News 0 02-03-2009 07:31 PM
LXer: NVIDIA VDPAU Benchmarks LXer Syndicated Linux News 0 11-15-2008 11:00 AM
onboard cards support on Redhat 9.0 vova Linux - Hardware 11 08-06-2003 01:33 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration