Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-15-09, 07:50 AM   #1
darksky
Registered User
 
Join Date: Aug 2008
Posts: 66
Default HOWTO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

This is the successful procedure I used to compile mplayer (nogui) w/ VDPAU on Ubuntu v8.10

Special thanks to both cehoyos and dk75 who helped me figure this out.

Step 0. Get and install the latest nvidia driver first (I'm assuming you know how to do this and am not placing steps in this guide). I'm very happily using v180.37 right now.

Step 1a. Get the needed packages and essential codec pack (x86 only):
Code:
$ sudo aptitude install libfreetype6-dev libxv-dev subversion build-dep mplayer
Step 1b. Only complete this if you're running an x86 flavor of Ubuntu. x86_64 users can skip this step entirely.
Code:
$ wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
$ sudo mkdir /usr/lib/codecs
$ tar -xjf essential-20071007.tar.bz2
$ sudo mv ./essential-20071007/* /usr/lib/codecs/
$ rmdir essential-20071007
Step 2. Check out the svn and compile:
Code:
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
<<let it download which might take 5-10 min depending on the server load>>
$ cd mplayer
$ ./configure --prefix=/usr --disable-mencoder
$ make -j4
Use a different value for -j if you have a dual core or single core CPU. -j4 is for a quad core, -j2 is for a dual, and you can just use 'make' with no -j switch for a single core.

If all went well, you'll have compiled mplayer. You can either run it from this dir (for testing purposes) without disturbing the one you likely have installed from the official ubuntu repos, or you can issue a 'sudo make install' to place the compiled binary and associated files into your live filesystem.

To uninstall it from your live filesystem, simply return to the compile dir and issue a 'sudo make uninstall' and all the files will be removed. If you are doing multiple compiles every few days because you want the latest svn version, enter the directory that contains 'mplayer' and issue the following command to update the code:

Code:
$ svn update
<<let it update>>
$ make
Potential Gotcha Items
If you're using compiz-fusion as your wm, make sure you're using direct rendering and loose binding for optimal performance. You are likely running fusion-icon to manage your compiz-fusion settings and these options are both available under the icon>compiz options.

Last edited by darksky; 03-16-09 at 02:47 PM.
darksky is offline   Reply With Quote
Old 03-15-09, 08:52 AM   #2
nullack
Registered User
 
Join Date: Oct 2007
Posts: 74
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

This is better, using checkinstall for deb package management:

http://ubuntuforums.org/showthread.php?t=1081070

Also instructions for x264 compiles

I use sudo apt-get build-dep mplayer-nogui mencoder and if Im using the repo supplied nvidia driver also the vdpau-dev package
nullack is offline   Reply With Quote
Old 03-15-09, 10:06 AM   #3
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Quote:
Originally Posted by darksky View Post
[code]$ sudo aptitude install libfreetype6-dev subversion libxv-dev git-core subversion build-dep mplayer
What do you need git-core for?
Quote:
$ wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
This does not work for x86_64!

Carl Eugen
cehoyos is offline   Reply With Quote
Old 03-15-09, 10:07 AM   #4
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Quote:
Originally Posted by nullack View Post
Also instructions for x264 compiles
Which are pointless since darksky uses --disable-mencoder.

Carl Eugen
cehoyos is offline   Reply With Quote
Old 03-15-09, 10:48 AM   #5
nullack
Registered User
 
Join Date: Oct 2007
Posts: 74
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

For him maybe, but for others, highly useful. Those who dont want to do the x264 bit can simply skip over it.
nullack is offline   Reply With Quote
Old 03-15-09, 02:20 PM   #6
darksky
Registered User
 
Join Date: Aug 2008
Posts: 66
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Oops... edited to remove git-core. Originally, it wouldn't compile without x264.
darksky is offline   Reply With Quote
Old 03-15-09, 02:35 PM   #7
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Quote:
Originally Posted by darksky View Post
enter your 'mplayer-svn' directory ...
With the line you used for svn checkout, there is no directory "mplayer-svn", but "mplayer" where svn up works.
Quote:
and issue the following command to update the code:

[code]$ svn update
<<let it update>>
$ cd mplayer
There is no directory "mplayer" inside the directory where you can use "svn up"
Quote:
$ make clean
While we strongly recommend to try make distclean && ./configure && make before reporting problems, as long as you don't have problems, "make" is enough and much faster.

Carl Eugen

PS: You install "subversion" now twice, and there is still no note that codecs-essential should not be used on x64.
cehoyos is offline   Reply With Quote
Old 03-15-09, 03:50 PM   #8
darksky
Registered User
 
Join Date: Aug 2008
Posts: 66
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

@cehoyos - errors corrected, thanks for proofing it
darksky is offline   Reply With Quote

Old 03-15-09, 05:01 PM   #9
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: HOWTO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Quote:
Originally Posted by darksky View Post
Code:
$ svn update
<<let it update>>
$ cd mplayer
$ make clean
No.

Just do
Code:
$ svn update
$ make
cd mplayer simply cannot work (if svn update succeeded in the current directory) and make clean is never necessary: make distclean is useful whenever you have problems and before reporting bugs.

Carl Eugen

PS: Since menu and vdpau exclude each other (and the menu is badly maintained at present), perhaps you should remove --enable-menu - it has nothing to do with OSD.

Last edited by cehoyos; 03-15-09 at 05:04 PM. Reason: Added a note about --enable-menu
cehoyos is offline   Reply With Quote
Old 03-15-09, 07:40 PM   #10
darksky
Registered User
 
Join Date: Aug 2008
Posts: 66
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

@cehoyos - right you are about the svn and the --enable menu. I thought that controlled the OSD but it does not. Edited and thanks again
darksky is offline   Reply With Quote
Old 03-16-09, 12:32 AM   #11
bugger
Registered User
 
Join Date: Apr 2006
Posts: 22
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

why do you use parameter "--disable-mencoder"? Is this necessary to get vdpau support?
bugger is offline   Reply With Quote
Old 03-16-09, 12:44 AM   #12
clarious
Registered User
 
Join Date: Jan 2009
Posts: 39
Default Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)

Quote:
Originally Posted by bugger View Post
why do you use parameter "--disable-mencoder"? Is this necessary to get vdpau support?
"--disable-mencoder" will disable encoding feature of Mplayer , e.g if you don't need to transcoding from one format to another. I guess most people don't need it anyway, and it will prevent troubles with x264.
clarious is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:16 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.