Compiling MPlayer on OpenSolaris 2008.05

Video playback (with codecs) is an absolute must to make OpenSolaris a workable alternative to Ubuntu for my home machine

What follows is a very quick guide to compiling MPlayer v1.0rc2 on OpenSolaris

Fetch gcc, gmake and gawk to allow us to compile MPlayer with minimum fuss; we also pull SUNWxorg-headers to allow us to compile the Xv video-out plugin (I also have FSWxorg-headers installed; if things don't work out, you may want to add that to the end of the list). As IPSgawk is in the Blastwave IPS repository, we add that also:

$ pfexec pkg set-authority -O http://blastwave.network.com:10000/ Blastwave
$ pfexec pkg install SUNWgcc SUNWgmake IPSgawk SUNWxorg-headers

Compiling MPlayer is now very straightforward, the only special thing we need to do is promote /opt/csw/gnu in our PATH during compile time. This is because various parts of the build fail with the standard Solaris awk, so we override with GNU awk:

$ echo $PATH
/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
$ export PATH=/usr/gnu/bin:/opt/csw/gnu:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
$ wget http://www8.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
$ tar jxf MPlayer-1.0rc2.tar.bz2 && cd MPlayer-1.0rc2
$ ./configure
$ gmake

Key points to watch out for are the list of enabled audio and video plugins upon configure completing (you almost certainly want Xv)

If all went well, you should be able to run MPlayer with a simple ./mplayer -vo xv /path/to/video

In the meantime, I'm looking into the best way to get MPlayer packages available via one of the standard IPS repositories

Comments:

Thanks for posting these clear instructions.

I agree that what most would consider basic media playback will hold back Indiana from many people using it day to day. We "the community" need to start looking at how we can incorporate this and other encumbered functionality (such as DVD playback) whilst also avoiding any sort of legal issues that come from the fact that these technologies are heavily patented.

I can see that MPlayer is in Blastwaves IPS however it seems to be one of the packages that wont work as yet (loops).

Posted by Che Kristo on May 17, 2008 at 09:51 AM BST #

imho if you are compiling mplayer from source, better do that with the svn version not rc2

Posted by sartek on May 17, 2008 at 10:53 AM BST #

Hi,

I have followed your procedure, but still got the following error message:

gmake[1]: Entering directory `/export/home/hliind/MPlayer-1.0rc2/vidix'
LC_ALL=C awk -f pci_db2c.awk pci.db
awk: syntax error near line 67
awk: illegal statement near line 67
awk: syntax error near line 76
awk: illegal statement near line 76
awk: syntax error near line 128
awk: bailing out near line 128
gmake[1]: \*\*\* [pci_names.c] Error 2
gmake[1]: Leaving directory `/export/home/hliind/MPlayer-1.0rc2/vidix'
gmake: \*\*\* [vidix/libvidix.a] Error 2

Thanks.

Posted by W. Wayne Liauh on May 18, 2008 at 01:13 AM BST #

Hi,

The awk errors are due to not having the GNU version of awk first in your PATH. Try:

$ export PATH=/opt/csw/gnu:$PATH

before running gmake. Also make sure that /opt/csw/gnu/awk exists and works

Posted by Lewis Thompson on May 18, 2008 at 04:06 AM BST #

Looks like the /opt/csw/gnu directory was never created, and gawk is found in /opt/csw/bin.

Posted by W. Wayne Liauh on May 18, 2008 at 04:20 PM BST #

Just for the completion of this "thread", after the installation of IPSgawk, among other packages listed in the original post, I needed to create the /opt/csw/gnu folder and then added a soft link from /opt/csw/bin:

pfexec ln -s /opt/csw/bin/gawk /opt/csw/gnu/awk

Now I just need to find a way to play video clips from CNN. Actually, who cares about CNN? :-)

Posted by W. Wayne Liauh on May 18, 2008 at 05:26 PM BST #

Thanks, I have been able to compile MPlayer. Your tutorial has been great. Thanks a whole bunch!

BTW, have you been able to compile mplayer plugin for Firefox? Thanks again.

Posted by W. Wayne Liauh on May 18, 2008 at 09:26 PM BST #

Sorry, not even looked at the Firefox plugin... yet! :P

Posted by Lewis on May 19, 2008 at 07:47 AM BST #

@Ken
the gmplayer pumps out: ld.so.1: mplayer: fatal: libggi.so.2: open failed: No such file or directory

I gather it is looking for something that has moved in indiana???

Posted by Che Kristo on May 19, 2008 at 10:33 PM BST #

Che,
Try doing 'pkg search -r libggi.so.2' to see if there is an IPS package that provides libggi.so.2. I don't know whether there is or not...

Posted by Lewis on May 20, 2008 at 02:11 AM BST #

HI,
I'm having the same problems that, W. Wayne Liauh... already tried to creat de file folder and enter "pfexec ln -s /opt/csw/bin/gawk /opt/csw/gnu/awk" ..

Posted by Fabio Canesin on May 20, 2008 at 02:52 AM BST #

Hi Fabio,
Did you make sure to set your PATH? i.e. $ export PATH=/opt/csw/gnu:$PATH

Posted by Lewis on May 20, 2008 at 03:33 AM BST #

I get an error message during compilation :

cc -o mencoder mencoder.o mp_msg-mencoder.o parser-mecmd.o xvid_vbr.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o get_path.o m_config.o m_option.o m_struct.o mpcommon.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subreader.o vobsub.o unrarlib.o libmpcodecs/libmpencoders.a libmpdemux/libmpmux.a libmpcodecs/libmpcodecs.a libaf/libaf.a libmpdemux/libmpdemux.a stream/stream.a libswscale/libswscale.a libvo/libosd.a libavformat/libavformat.a libavcodec/libavcodec.a libavutil/libavutil.a libpostproc/libpostproc.a loader/libloader.a mp3lib/libmp3.a liba52/liba52.a libmpeg2/libmpeg2.a libfaad2/libfaad2.a tremor/libvorbisidec.a dvdread/libdvdread.a libdvdcss/libdvdcss.a libass/libass.a osdep/libosdep.a -L/usr/lib -L/usr/lib -lkstat -lposix4 -lsocket -lnsl -ltermcap -lsmbclient -lpng -lz -ljpeg -lfreetype -lfontconfig -lz -lmad -lspeex -ltheora -logg -rdynamic -lm
cc: unrecognized option `-rdynamic'

ggravier@opensoltink:~/Download/go/MPlayer-1.0rc2$ cc --version
cc (GCC) 3.4.3 (csl-sol210-3_4-20050802)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ggravier@opensoltink:~/Download/go/MPlayer-1.0rc2$

Posted by Gilles on July 31, 2008 at 09:51 AM BST #

Aha... removed the lines with rdynamic from the "configure" file and problem solved. IT now works.

Posted by Gilles on July 31, 2008 at 10:10 AM BST #

Hello Lewis, I want to know if it's possible to compile MPlayer GUI to use in OpenSolaris 2008.05, and how? Thanks.

Posted by Yurippe on August 26, 2008 at 03:13 AM BST #

Hi Yurippe, sorry but I didn't attempt to compile the GUI, so I can't offer any advice with that

Posted by Lewis Thompson on August 26, 2008 at 03:29 AM BST #

I am receive a message "pkg: no package matching IPSgawk could be found in current catalog...", why?

regards

Posted by Luciano on October 10, 2008 at 04:21 PM BST #

Luciano - try to enable blastwave repositories for this package to be found

Posted by nayward on October 14, 2008 at 03:18 PM BST #

I did something similar & accomplished the same if not better result. I posted it @ http://forum.opensolaris.com/thread.jspa?threadID=684&tstart=0

I posted this here as well, because I feel it is more relevant to the topic.

I been messing around with Mplayer & trying to get aTunes working, because aTunes uses Mplayer's environment for playback. It took a while, but after about a week of research & trial & errors just trying to configure the src for Mplayer. I may have cheated, because I have LWS added as an IPS repo, and I have everything from it installed, and I used it as a lib dir.

The following is the configure line for mplayer:

./configure --libdir=/opt/LSW/lib --enable-color-console --enable-gui --enable-menu --prefix=/usr

I installed it directly into the OpenSolaris file structure, and seems to working fine. I had a couple of issues with getting it to gmake install due to some -rdynamic issue, but I just deleted it from the config.mak file & ran "gmake install" again, (make sure once you delete this file you do not run ./configure again, because it just remakes the same unedited file again). I also had some issues with trying to get the Makefile to just install the mplayer, mencoder, & the man files, but I made some adjustments & copied over some files manually & it seems to work well (After downloading a skin) as a stand alone player for m4a, mp3, what ever else you want. It also enables aTunes to work flawlessly. After I got this working I decided to try to the mplayerplug-in working for Firefox, so I downloaded the source for the plugin & compiled it with the following:

./configure --prefix=/usr --with-mozilla-home=/usr/lib/firefox --enable-wmp --enable-qt --enable-rm --enable-gmp --enable-dvx --libdir=/opt/LSW/lib

And Presto Built & installed I tried it out on a page with mms & it hung out gray for a while & then it launched with sound & all of that nice stuff. I was trying to get Songbird working, but I could not get it to recognize any gst plug-ins were ever they were installed or linked, so I am happy that I got some thing to work well & with a linited amount of aggrevation.

I will answer any questions that anyone may have, and I will get some detailed instructions on How To Do this fun stuff after I get all of the info together.

Later!

Posted by susegecko on November 16, 2008 at 02:46 PM GMT #

Post a Comment:
Comments are closed for this entry.
About

stuff I get up to :)

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today