Go Vegetarian

Go Vegetarian

Thursday, April 09, 2009

MPLayer on OpenSolaris 2008.11

Hi,

I am in my hotel room in Paris and god damn I would like to read a dvd on my laptop...

Totem ? Not working !!!

So what ? Install Windows in Virtual Box ???
This is overkill !

The answer is MPlayer. OK. You have to compile it. But not that difficult.

I followed the procedure described here.
  • Get the packages
root@vegan:~# pfexec pkg install SUNWgcc SUNWgmake IPSgawk SUNWxorg-headers DOWNLOAD PKGS FILES XFER (MB) Completed 12/12 2941/2941 40.67/40.67 PHASE ACTIONS Install Phase 3835/3835 PHASE ITEMS Reading Existing Index 9/9 Indexing Packages 12/12 root@vegan:~#
  • Change your path
root@vegan:~# echo $PATH /usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin root@vegan:~# export PATH=/usr/gnu/bin:/opt/csw/gnu:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
  • Download MPLayer
root@vegan:~# wget http://www8.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2 --18:20:17-- http://www8.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2 => `MPlayer-1.0rc2.tar.bz2' Resolving www8.mplayerhq.hu... 81.91.100.172 Connecting to www8.mplayerhq.hu|81.91.100.172|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9,338,201 (8.9M) [application/x-bzip2] 100%[====================================>] 9,338,201 564.69K/s ETA 00:00 18:20:36 (595.41 KB/s) - `MPlayer-1.0rc2.tar.bz2' saved [9338201/9338201] root@vegan:~#
  • Extract MPLayer and enter the directory
root@vegan:~# tar jxf MPlayer-1.0rc2.tar.bz2 && cd MPlayer-1.0rc2
  • configure the software for your particular platform
root@vegan:~# ./configure
...
...
...

  • compile the software for your particular platform
root@vegan:~# gmake

gmake[1]: Leaving directory `/root/MPlayer-1.0rc2/libmpdemux'
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 osdep/libosdep.a -L/usr/lib -lkstat -lposix4 -lsocket -lnsl -ltermcap -lsmbclient -lpng -lz -ljpeg -lz -lspeex -ltheora -logg -rdynamic -lm
cc: unrecognized option `-rdynamic'
root@vegan:~/MPlayer-1.0rc2#

  • Modify the file configure
root@vegan:~/MPlayer-1.0rc2# diff configure /export/home/rudy/Download/configure 7329a7330,7331 > # ruv > _ld_dl_dynamic='' root@vegan:~/MPlayer-1.0rc2#
_ld_dl_dynamic was emptied(1 modification in total).

# Dynamic linking flags
# (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
_ld_dl_dynamic=''
bsd && _ld_dl_dynamic='-rdynamic'
if test "$_real" = yes || test "$_xanim" = yes && not win32 && not qnx && not darwin ; then
_ld_dl_dynamic='-rdynamic'
fi
_ld_dl_dynamic='' <=== this line was added !!!
  • configure again
root@vegan:~# ./configure
Detected operating system: SunOS
Detected host architecture: i386
Checking for cc version ... 3.4.3, ok
Checking for host cc ... cc
Checking for cross compilation ... no
Checking for CPU vendor ... GenuineIntel (6:15:6)
Checking for CPU type ... Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Checking for kernel support of mmx ... yes
Checking for kernel support of mmxext ... yes
Checking for kernel support of sse ... yes
Checking for kernel support of sse2 ... yes
Checking for kernel support of ssse3 ... failed
...
...
...
Check configure.log if you wonder why an autodetection failed (make sure
development headers/packages are installed).

NOTE: The --enable-* parameters unconditionally force options on, completely
skipping autodetection. This behavior is unlike what you may be used to from
autoconf-based configure scripts that can decide to override you. This greater
level of control comes at a price. You may have to provide the correct compiler
and linker flags yourself.
If you used one of these options (except --enable-gui and similar ones that
turn on internal features) and experience a compilation or linking failure,
make sure you have passed the necessary compiler/linker flags to configure.

If you suspect a bug, please read DOCS/HTML/en/bugreports.html.
  • compile the software again
./version.sh `cc -dumpversion`
cc -I./libavcodec -I./libavformat -Wdisabled-optimization -Wdeclaration-after-statement -I. -I. -I./libavutil -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H -I/usr/X11/include -I/usr/include/SDL -D_REENTRANT -c -o mplayer.o mplayer.c
cc -I./libavcodec -I./libavformat -Wdisabled-optimization -Wdeclaration-after-statement -I. -I. -I./libavutil -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H -I/usr/X11/include -I/usr/include/SDL -D_REENTRANT -c -o vobsub.o vobsub.c
gmake -C libvo libvo.a
...
...
...
gmake[1]: `libmpmux.a' is up to date.
gmake[1]: Leaving directory `/root/MPlayer-1.0rc2/libmpdemux'
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 osdep/libosdep.a -L/usr/lib -lkstat -lposix4 -lsocket -lnsl -ltermcap -lsmbclient -lpng -lz -ljpeg -lz -lspeex -ltheora -logg -lm

  • run MPlayer






No comments: