nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64) (http://www.nvnews.net/vbulletin/showthread.php?t=130079)

darksky 03-15-09 06:50 AM

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.

nullack 03-15-09 07:52 AM

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

cehoyos 03-15-09 09:06 AM

Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
Quote:

Originally Posted by darksky (Post 1958290)
[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 03-15-09 09:07 AM

Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
Quote:

Originally Posted by nullack (Post 1958318)
Also instructions for x264 compiles

Which are pointless since darksky uses --disable-mencoder.

Carl Eugen

nullack 03-15-09 09:48 AM

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.

darksky 03-15-09 01:20 PM

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.

cehoyos 03-15-09 01:35 PM

Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
Quote:

Originally Posted by darksky (Post 1958290)
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.

darksky 03-15-09 02:50 PM

Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
@cehoyos - errors corrected, thanks for proofing it :)

cehoyos 03-15-09 04:01 PM

Re: HOWTO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
Quote:

Originally Posted by darksky (Post 1958290)
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.

darksky 03-15-09 06:40 PM

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 :)

bugger 03-15-09 11:32 PM

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?

clarious 03-15-09 11:44 PM

Re: HOTWO: compile mplayer with VDPAU under Ubuntu (x86 or x86_64)
 
Quote:

Originally Posted by bugger (Post 1958919)
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.


All times are GMT -5. The time now is 07:10 PM.

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