Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old October 17th, 2005   #1
seethru
Way Too Much Ubuntu
 
Join Date: Aug 2005
Location: Toronto, Ontario
Beans: 298
Ubuntu 8.10 Intrepid Ibex
Send a message via MSN to seethru
HOWTO: Compile MPlayer with a GTK2 GUI

I've always hated the MPlayer GUI, but could never bring myself to change players because I like having the controls and the movie seperated. After a little bit of googling, I managed to find a patch for the newest version. This is a very simple HOWTO, and I've also included how to compile the mplayer plugin with GTK2, which requires no patching.

Lets start off with the essentials, the source, and the build tools (for those who have never compiled before)

You can grab the source from here ftp://ftp.mplayerhq.hu/MPlayer/relea...e7try2.tar.bz2.

Once that has downloaded, extract it by either opening nautilus and browsing to it's location and opening it with archive manager, or run this command.
Code:
tar xjfv MPlayer-1.0pre7try2.tar.bz2
Once thats extracted we'll get all the dependencies and build tools, although if you're reading this it's possible you've used MPlayer before and hate the GTK1 GUI as much as I did.

Code:
sudo apt-get install build-essential
sudo apt-get install gcc-3.4
sudo apt-get install libx11-dev
sudo apt-get install libxv-dev
sudo apt-get install libpng12-0
sudo apt-get install libpng12-dev
sudo apt-get install checkinstall
sudo apt-get install libavcodec-dev
and any other codecs you need

Now, one more thing to download, the patch from here http://seethrubuntu.ath.cx/MPlayer-1...gtk2.patch.bz2

Make sure to download that to the same directory that you downloaded MPlayer-1.0pre7.tar.bz2 to.

Once the download is done, do the following.
Code:
cd /location/to/MPlayer-1.0pre7try2
bzcat ../MPlayer-1.0pre7-gtk2.patch.bz2 |patch -p1
This will patch two files, and after this it's time to start building.
In the MPlayer-1.0pre7try2 directory run the configure command.
Code:
./configure --enable-gui --enable-gtk2
It'll go through the usual configure bit, and you might see it check your GTK version .

Once configure is done, just run
Code:
make && sudo checkinstall
This will make MPlayer, build a deb, and install the deb for you.
KNOWN ISSUES: Right click on the movie window does not work every time, I've found however if you double click it fast, it does work. I'll be looking into this tonight as there is a patch for a previous version of mplayer that fixes this.


Now, once thats installed, onto MPlayer plugin.
You can grab the source from here http://prdownloads.sourceforge.net/m...ar.gz?download and you'll also need the mozilla gecko-sdk which can be found here http://ftp.mozilla.org/pub/mozilla.o...t-1.8b1.tar.gz

Once that is downloaded, extract it, just like we did MPlayer, then browse to the directory it made and run configure again, this time with the following options.
Code:
./configure --with-gecko-sdk=/path/to/gecko-sdk --enable-gtk2
Once configure is done, just run
Code:
make && sudo checkinstall
and again, it will compile, build a deb file, and install the deb file for you.

Last edited by seethru; October 18th, 2005 at 12:21 PM..
seethru is offline   Reply With Quote
Old October 17th, 2005   #2
LaSSarD
A Carafe of Ubuntu
 
Join Date: Jul 2005
Location: Brasil
Beans: 67
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Other packages you need:
libpng
libpng-dev

I think libavcodec-dev would be the right package when you mean libavcodec. Another mistake here:
bzcat ../MPlayer-1.0pre7-gtk2.patch.bz2 |patch -p1
It should be:
bzcat MPlayer-1.0pre7-gtk2.patch.bz2 |patch -p1

When executing:
./configure --with-gecko-sdk=/path/to/gecko-sdk --enable-gtk2
I've got an error:
Checking for gcc-3.4 version ... not found
Checking for gcc-3.3 version ... not found
Checking for gcc-3.2 version ... not found
Checking for gcc-3.1 version ... not found
Checking for gcc3 version ... not found
Checking for gcc-3.0 version ... not found
Checking for cc version ... 4.0.2, bad

I think the problem is the new breezy gcc version... Then I did:
./configure --enable-gui --enable-gtk2 --disable-gcc-checking

OK, but...

Error: X11 support required for GUI compilation
__________________
Come on, search is easier than posting!
UbuntuForums Search | Ubuntu Wiki | UbuntuGuide | GoogleLinux

Last edited by LaSSarD; October 17th, 2005 at 07:34 PM..
LaSSarD is offline   Reply With Quote
Old October 17th, 2005   #3
seethru
Way Too Much Ubuntu
 
Join Date: Aug 2005
Location: Toronto, Ontario
Beans: 298
Ubuntu 8.10 Intrepid Ibex
Send a message via MSN to seethru
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Quote:
Originally Posted by LaSSarD
I think libavcodec-dev would be the right package. Another mistake here:
bzcat ../MPlayer-1.0pre7-gtk2.patch.bz2 |patch -p1
It should be:
bzcat MPlayer-1.0pre7-gtk2.patch.bz2 |patch -p1

When executing:
./configure --with-gecko-sdk=/path/to/gecko-sdk --enable-gtk2
I've got an error:
Checking for gcc-3.4 version ... not found
Checking for gcc-3.3 version ... not found
Checking for gcc-3.2 version ... not found
Checking for gcc-3.1 version ... not found
Checking for gcc3 version ... not found
Checking for gcc-3.0 version ... not found
Checking for cc version ... 4.0.2, bad

I think the problem is the new breezy gcc version...
Thanks for the tut anyway
sudo apt-get gcc-3.4
you also need to change /path/to/hecko-sdk to whatever /path/to is.

I'll be sure to add that into the HOWTO.

Last edited by seethru; October 17th, 2005 at 07:42 PM..
seethru is offline   Reply With Quote
Old October 17th, 2005   #4
scourge
Way Too Much Ubuntu
 
scourge's Avatar
 
Join Date: Apr 2005
Location: Finland
Beans: 288
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Okay, once I installed gcc-3.4 it compiled with quite a few warnings. It worked somewhat well, except that the right-click menu stopped working and I had only two video drivers to choose from. The difference in appearance was stunning though.
scourge is offline   Reply With Quote
Old October 17th, 2005   #5
seethru
Way Too Much Ubuntu
 
Join Date: Aug 2005
Location: Toronto, Ontario
Beans: 298
Ubuntu 8.10 Intrepid Ibex
Send a message via MSN to seethru
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Quote:
Originally Posted by scourge
Okay, once I installed gcc-3.4 it compiled with quite a few warnings. It worked somewhat well, except that the right-click menu stopped working and I had only two video drivers to choose from. The difference in appearance was stunning though.
Yeah, the right click issue is annoying, there's a patch for pre5 which includes a fix for that so I'm going to comb through it tonight and see if I can't add that to the patch.
seethru is offline   Reply With Quote
Old October 17th, 2005   #6
seethru
Way Too Much Ubuntu
 
Join Date: Aug 2005
Location: Toronto, Ontario
Beans: 298
Ubuntu 8.10 Intrepid Ibex
Send a message via MSN to seethru
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Quote:
Originally Posted by LaSSarD
Error: X11 support required for GUI compilation
sudo apt-get install libx11-dev

Can't believe I've missed these, thats what I get for assuming...lol

Last edited by seethru; October 17th, 2005 at 09:23 PM..
seethru is offline   Reply With Quote
Old October 17th, 2005   #7
vaskark
Gee! These Aren't Roasted!
 
vaskark's Avatar
 
Join Date: Oct 2004
Location: Ontario
Beans: 187
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Thank god! Great work, seethru. Any chance of doing the same thing for Xine?
__________________


Last edited by vaskark; October 18th, 2005 at 12:16 AM..
vaskark is offline   Reply With Quote
Old October 17th, 2005   #8
Azrael
A Carafe of Ubuntu
 
Join Date: Oct 2005
Location: Astarica
Beans: 104
Ubuntu 6.06
Re: HOWTO: Compile MPlayer with a GTK2 GUI

This is a nice howto and compiling and installing went without problems, but:

This method doesn't seem to compile with xv support!

mplayer -vo help | grep xv

...verifies this, because a line similar to this should appear: xv X11/Xv But it doesn't (for me at least).

I definitely need xv for my S3 Savage video card. Anyone know what's going wrong?
Azrael is offline   Reply With Quote
Old October 17th, 2005   #9
NeoChaosX
Grande Half-n-Half Cinnamon Ubuntu
 
NeoChaosX's Avatar
 
Join Date: Jan 2005
Location: San Jose, CA
Beans: 579
Kubuntu 6.10 Edgy
Send a message via AIM to NeoChaosX
Re: HOWTO: Compile MPlayer with a GTK2 GUI

You want to install libxv-dev to get xv support compiled.
__________________
the LJ

What's wrong with closed and open source co-exisiting?
NeoChaosX is offline   Reply With Quote
Old October 18th, 2005   #10
Azrael
A Carafe of Ubuntu
 
Join Date: Oct 2005
Location: Astarica
Beans: 104
Ubuntu 6.06
Re: HOWTO: Compile MPlayer with a GTK2 GUI

Quote:
Originally Posted by NeoChaosX
You want to install libxv-dev to get xv support compiled.
Oh, I guess I missed that one. Thank you!
Azrael is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 -4. The time now is 01:43 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry