My favorites | Sign in
Project Home Downloads Wiki
Search
for
Compiling  
Compiling mplayer.git the same way as mplayerosx-builds
Featured, Phase-Implementation
Updated Mar 27, 2012 by stefano....@gmail.com

outdated: please use the instructions at https://github.com/pigoz/mplayerosx-builds

This document is still work in progress.

Note when building I work into a directory into my home called dev, my tree looks like this:

~
|- dev
    |- libbs2b-3.1.0
    |- mplayer-build
    |- mplayerosx-builds

To make this document more readable I'll assume that you are using the same directory structure.

Install GNU's autotools

The autotools coming with Mac OSX gave me problems so I recompiled them using MacPorts.

sudo port install autoconf automake libtool pkgconfig

Compile the dependencies

mplayerosx-builds uses MacPorts to build most of the dependencies. This is a list of the dependencies you need to install with MacPorts to have similar functionalities:

sudo port install bzip2 expat freetype fontconfig libdvdnav libdvdread libdvdcss libiconv libpng libtheora ncurses zlib lzo2

Compile BS2B

BS2B is not available as a MacPorts package so you need to build manually. First you need to build libsndfile because BS2B depends on it, luckyly this is available on MacPorts:

sudo port install libsndfile

Then you can get the BS2B source tarball and compile.

cd ~/dev
wget http://downloads.sourceforge.net/project/bs2b/bs2b/3.1.0/libbs2b-3.1.0.tar.gz?use_mirror=dfn
tar xvfz libbs2b-3.1.0.tar.gz
cd libbs2b-3.1.0/
mkdir build && cd build
export CFLAGS=-I/opt/local/include
export LDFLAGS=-L/opt/local/lib
export LIBTOOL=/opt/local/bin/glibtool
export LIBTOOLIZE=/opt/local/bin/glibtoolize
../configure
make
sudo make install

Get the build scripts

The compilation process uses the scripts provided by Uoti here: http://repo.or.cz/w/mplayer-build.git

Edit the configuration files

After cloning the mplayer-build repository you need to:

./init
./enable-mt

You can now proceed to edit the configuration files to add some options to the configures.

common_options:

--cc=gcc-4.2

ffmpeg_options:

--cpu=core2
--arch=x86_64

mplayer_options:

--disable-x11
--disable-gl
--disable-mencoder
--enable-macosx-bundle
--enable-macosx-finder
--target=x86_64-Darwin

Apply the patches

I have developed some custom patches to improve the behavior of mplayer with MPlayer OSX Extended. To apply the patches use git apply into mplayer's source tree root (~/dev/mplayer-build/mplayer):

git apply ~/dev/mplayerosx-builds/mplayer-patches/${PATCHNAME}.diff

Compile ffmpeg+libass+mplayer

Run make in the mplayer-build directory. The build scripts will take care of everything from running configure to the actual building.

Comment by shiggity...@gmail.com, Jul 18, 2010

Thanks very much for this tutorial, but I can't seem to get it built (whether it be here on OS X or on Gentoo Linux). Here's where it gets stuck:

-I/Users/shiggity/dev/mplayer-build/build_libs/include -I/Users/shiggity/dev/mplayer-build/build_libs/include -I/opt/local/include -I/opt/local/include/libdvdread -c -o fmt-conversion.o fmt-conversion.c fmt-conversion.c:31: error: 'PIX_FMT_RGB565BE' undeclared here (not in a function) fmt-conversion.c:32: error: 'PIX_FMT_RGB565LE' undeclared here (not in a function) fmt-conversion.c:33: error: 'PIX_FMT_RGB555BE' undeclared here (not in a function) fmt-conversion.c:34: error: 'PIX_FMT_RGB555LE' undeclared here (not in a function) fmt-conversion.c:35: error: 'PIX_FMT_RGB444BE' undeclared here (not in a function) fmt-conversion.c:36: error: 'PIX_FMT_RGB444LE' undeclared here (not in a function) fmt-conversion.c:48: error: 'PIX_FMT_BGR565BE' undeclared here (not in a function) fmt-conversion.c:49: error: 'PIX_FMT_BGR565LE' undeclared here (not in a function) fmt-conversion.c:50: error: 'PIX_FMT_BGR555BE' undeclared here (not in a function) fmt-conversion.c:51: error: 'PIX_FMT_BGR555LE' undeclared here (not in a function) fmt-conversion.c:52: error: 'PIX_FMT_BGR444BE' undeclared here (not in a function) fmt-conversion.c:53: error: 'PIX_FMT_BGR444LE' undeclared here (not in a function) fmt-conversion.c:75: error: 'PIX_FMT_YUV420P16LE' undeclared here (not in a function) fmt-conversion.c:76: error: 'PIX_FMT_YUV420P16BE' undeclared here (not in a function) fmt-conversion.c:77: error: 'PIX_FMT_YUV422P16LE' undeclared here (not in a function) fmt-conversion.c:78: error: 'PIX_FMT_YUV422P16BE' undeclared here (not in a function) fmt-conversion.c:79: error: 'PIX_FMT_YUV444P16LE' undeclared here (not in a function) fmt-conversion.c:80: error: 'PIX_FMT_YUV444P16BE' undeclared here (not in a function) fmt-conversion.c:97: error: 'PIX_FMT_VDPAU_MPEG4' undeclared here (not in a function) make1?: [fmt-conversion.o] Error 1 make: mplayer? Error 2

Ideas?

Comment by shiggity...@gmail.com, Jul 18, 2010

Also, for some reason when trying to git clone http://repo.or.cz/w/mplayer-build.git it complains of:

shiggitys_core_i5:~ shiggity$ git clone http://repo.or.cz/w/mplayer-build.git Initialized empty Git repository in /Users/shiggity/mplayer-build/.git/ warning: remote HEAD refers to nonexistent ref, unable to checkout.

so I used http://repo.or.cz/r/mplayer-build.git instead and it cloned just fine. All else worked fine.

Comment by shiggity...@gmail.com, Jul 18, 2010

...Since I posted those comments I went ahead and got the latest MPlayerOSXExtended, and I told it to use the FFMPEG-MT SVN binary, and it worked great. Thanks.

Comment by shiggity...@gmail.com, Jul 23, 2010

Heh and also when I was booted to my Linux install I found a tutorial that got this working on the command line as well. =- )

Comment by shiggity...@gmail.com, Jul 23, 2010

btw I'm the same person as "shiggitylive".


Sign in to add a comment
Powered by Google Project Hosting