[MPlayer-users] getting make to work for ARM

Kumar Sharad-r2aaju sharad.kumar at freescale.com
Sat Feb 5 22:05:45 CET 2005

I am new to this but it almost seems to me that the option to specify the assembler on the configure command line is not working properly.  

I only say this because I find that the specified compiler 'CC=arm-gcc-linux' gets specified in the config.mak file.  However, the ARM assembler is not specified anywhere in the file.

./configure --target=arm --cc=arm-linux-gcc --as=arm-linux-as --enable-static

Any help on what I need to do to specify the assembler correctly or to build MPlayer for ARM will be much appreciated.


-----Original Message-----
From: mplayer-users-bounces at mplayerhq.hu [mailto:mplayer-users-bounces at mplayerhq.hu] On Behalf Of Trilok Soni
Sent: Saturday, February 05, 2005 7:20 AM
To: MPlayer usage questions, feature requests, bug reports; 'torinthiel at megapolis.pl'
Subject: RE: [MPlayer-users] getting make to work for ARM

--- Kumar Sharad-r2aaju <sharad.kumar at freescale.com>

> Torinthiel,
> I followed your instructions to first build for the
> host, and get a bit further.
> > ./configure
> > make codecs.conf.h
> > ./configure --target=arm --cc=arm-linux-gcc
> --as=arm-linux-as --enable-static

You can try following unstructured and dirty steps to
build mplayer for ARM :-) . arm-linux-gcc is 3.4.0. 

6.4. Building the Mplayer
Now, we can start configuring the mplayer with GUI
support.  Along with default mplayer support, we will
make changes to mplayer source, so that we can play
3GP, H.263 video, Mpeg4 Video too. Configure and Install Mplayer
#cd /usr/local/build/mplayer
Edit the Gui/mplayer/gtk/about.c with adding following
line before "includes". 
This macro enables broken (not-stable) support of GTK+
too, which is required for building mplayer GUI
Editing configure:
You need to edit "configure" file in order to add
"Xau" library. Open the file and search for
"__ld_x11=" symbol and add the "-lXau -lXcursor
-lXrender -Xfixes" before $ld_sock.
Editing mplayer.c:
Please add #define PATH_MAX 256 before "includes"
otherwise you will get compile time error.
Copy libavformat:
Now copy the "libavformat" from "ffmpeg" source to
mplayer. As mplayer package by default is not
supplying "libavformat" source.
#cp -r /usr/local/build/ffmpeg/libavformat ./
Now configure the mplayer with following command.
-I$TARGETDIR/include/atk-1.0" ./configure
--target=arm-linux --cc=arm-linux-gcc
--disable-network --disable-ftp --disable-mpdvdkit
--disable-dvdread --disable-fbdev  --disable-win32
--enable-x11 --with-x11incdir=$TARGETDIR/include
--with-x11libdir=$TARGETDIR/lib --prefix=$TARGETDIR
--enable-gui --enable-png
Editing Makefile:
You need to edit makefile so that codec-cfg binary is
created for host machine (x86) not the target (arm).
Please change $(CC) to gcc in lines below :
$(PRG_CFG): version.h codec-cfg.c codec-cfg.h
$(CC) $(CFLAGS) -g codec-cfg.c mp_msg.c -o $(PRG_CFG)

Above process will generate mplayer, which will yet
not support AAC encoding and decoding support, H.263 ,
3GP and amr_nb.
Now copy the "libavcodec" directory from "ffmpeg"
source to mplayer source.  This step will replace
existing "libavcodec" code of mplayer.
#cp -r /usr/local/build/ffmpeg/libavcodec ./ 
Open config.h and edit the HAVE_FAAD line with
following lines. This will enable libfaad support in
/* enable FAAD (AAC) support */
#undef HAVE_FAAD

---After changes-----
/* enable FAAD (AAC) support */
#define HAVE_FAAD 1
#define FAADVERSION 21

And copy following lines at the end of config.h, but
before #endif
#define CONFIG_FAAD 1
#define CONFIG_FAAC 1
#define CONFIG_GPL 1
#define AMR_NB 1
#define AMR_NB_FIXED 1
#define TUNECPU generic
#define CONFIG_RISKY 1
Copy following lines to "config.mak" to enable
mplayer-ffmpeg sourcecode for "amr_nb_fixed" support.
#---for ffmpeg
EXTRALIBS=-lmp3lame -lfaac -lfaad -lSDL -lX11 -lXext
-lXau -ldl
You need to change SRC_PATH variable in above ffmpeg
configuration if it is pointing somewhere else.
Patching demux.h:
    Now, we need apply one "amr_nb" patch, which will
fix the audio output problem with "amr codec" in
mplayer.  Follow these instructions to apply the
   #cd .. [go to one level above from mplayer source]
   #cat patches/mplayer/demux.patch | patch  -p1
Caution: Please don't issue "configure" command after
above modifications. As all the change will be lost if
you do the same.
   Now we can have mplayer with
"3GP/amr_nb/h.263/faac/faad" support.
Finally start building the mplayer:
   #make install Files to be copied on OMAP File System.
#cp -a $TARGETDIR/bin/mplayer $FILESYSTEM/bin
#cp -a $TARGETDIR/bin/mencoder $FILESYSTEM/bin
One skin is required for GUI based mplayer to be
displayed with proper look. We have downloaded
"Blue-small" skin from the mplayer site. Please untar
the tarball under your OMAP file system.
#cd $FILESYSTEM/.mplayer/Skin
#tar -xvzf "Blue-small-skin.tar.gz"
Atleast one set of fonts are required to be downloaded
from mplayer website. Please untar the tarball into
following directory.
#tar -xvzf "font-arial-iso-8859-1.tar.gz"
Fonts Usage:
select font size and copy the content of the directory
to FILESYSTEM ~/.mplayer/font/ 
example: cp font-arial-18-iso-8859-1/* 
This files lists out number of audio and video codecs
supported by mplayer. We need to edit this file before
we copy it to the filesystem for 3GP and AMR formats.
Edit the codecs.conf
#cd /usr/local/scratch/build/windowsystem/mplayer
#vi etc/codecs.conf
Adding support for 3GP format:
Find "ffh263" and add the following line at the end of
that codecs section

format 0x33363273
: Finally it should like this:
videocodec ffh263
  info "FFmpeg H263+ decoder"
  status working
  fourcc H263,U263,h263,X263
  fourcc viv1 h263
  driver ffmpeg
  dll h263
  out YV12,I420,IYUV
  format 0x33363273
 Adding support for AMR codecs:
Please add following audiocodec section into
codecs.conf  :
audiocodec ffamr
  format 0x726D7163
  fourcc samr
  driver ffmpeg
  dll "amr_nb"
Copy codecs.conf to filesystem.
#cp etc/codecs.conf $FILESYSTEM/.mplayer/codecs.conf
You can find mplayer codecs.conf used by us under
patches/mplayer directory.
Mplayer configuration file:
Mplayer config file specifies various configuration
settings for mplayer at run time. Eg. X-server, fb
device, skin name
You can find mplayer config file used by us under
patches/mplayer directory.
Editing example.conf
#vi etc/example.conf
Please make sure that "skin" variable is assigned to
"Blue-Small", "cache=8192" , "vo=x11",
"framedrop=yes", "mixer=/dev/sound/mixer". You can
refer the mplayer.conf supplied in patches directory.
Copy the mplayer configuration file to OMAP
#cp etc/example.conf $FILESYSTEM/.mplayer/config
Now you can run the "mplayer - console based" or
"gmplayer (which is nothing but simlink to mplayer)
and enjoy the AV playback.

---Trilok Soni

Do you Yahoo!? 
All your favorites on one personal page - Try My Yahoo!

MPlayer-users mailing list
MPlayer-users at mplayerhq.hu

More information about the MPlayer-users mailing list