Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#319529 - 18/02/2009 22:05 Mplayer on Central
geeknerd
member

Registered: 24/09/2003
Posts: 148
I have it working with integer only streaming of mp3 and wma. I'm listing to XM Online at the moment, it sounds much better over the internet than from the satelite. WMA takes about 50-55% cpu decoding 64.0 kbit WMA. MP3 takes a bit less (you have to run mplayer with "-ac ffmp3" to get the integer only decoder.)

It was a major pain to get working but somehow I did it.

Anyone want a binary distribution?

Before I forget, here's how I did it:

1. Install a chroot debian potato (2.3) environment on the central. There are instructions on how to do this on this site.

2. Upgrade to binutils-2.16.1. You may be able to go with an even newer binutils with a newer gcc, but I haven't tried.

3. Upgrade to gcc-3.4.6 in your chroot. Download the source from gcc.gnu.org.

./configure --enable-languages=c,c++,f77

This disables gcj (java) and some other stuff. Compiling gcj requires more RAM than the central has.

4. Download the integer wma patch from:

http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2008-April/057292.html

Look at the bottom of the email for the patch.

5. Get the svn of mplayer from 2007-10-01.

svn checkout -r {2007-10-01} [url=svn://svn.mplayerhq.hu/mplayer/trunk][url=svn://svn.mplayerhq.hu/mplayer/trunk][url=svn://svn.mplayerhq.hu/mplayer/trunk]svn://svn.mplayerhq.hu/mplayer/trunk[/url][/url][/url] mplayer

6. Apply the patch, it should apply with no conflicts.

7. Update mplayer via svn to current. Fix the conflicts. I leave this part as an exercise for the reader.

8. Fix configure to properly detect the armv41 cpu.

You will have to add "&& tmp_run" to each of the ARM detection sections. The original detection may work on the updated gcc, but I haven't checked yet

echocheck "ARMv5TE (Enhanced DSP Extensions)"
if test $_armv5te = "auto" ; then
cat > $TMPC << EOF
int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
EOF
_armv5te=no
cc_check && tmp_run && _armv5te=yes
fi
echores "$_armv5te"

9. You may have to compile mpegvideo_enc.c, swscale.c and snow.c with no optimizations (-O0). When you get to the point where your machine is locked from gcc taking all your ram and swap, hit cntl-c and run:

make CFLAGS="<cut and paste the flags from the make output, change -O4 to -O0>"

After that file compiles, hit control-c and run plain "make" again.

10. Had to define INFINITY in nellymoser.c. I have no clue what it is supposed to be, but I assigned to 0. I'd prefer to not compile the nellymoser codec, but the build doesn't allow.

11. Comment out setting the number of audio channels because jupiter doesn't implement it. Mplayer chokes if it can't set the channels.

Change in ao_oss.c
Search for MSGTR_AO_OSS_CantSetChans and comment the relevant part out.

12. I configured mplayer with the following flags:

./configure --enable-libwma --disable-dvdnav --disable-dvdread --disable-dvdread-internal --disable-libdvdcss-internal --disable-libmpeg2 --cc=gcc --disable-sdl --disable-fbdev --disable-yuv4mpeg --disable-md5sum --disable-tga --disable-pnm --disable-tv --with-extraincdir=/usr/include --disable-png

13. Compile!

Top
#319635 - 21/02/2009 03:23 Re: Mplayer on Central [Re: geeknerd]
geeknerd
member

Registered: 24/09/2003
Posts: 148
The mad decoder works much better. CPU is around 15-17% using mad instead of ffmp3. Resampling to 44.1hz takes an extra 1% or so.

mplayer -ac mad -af resample=44100

Top
#320273 - 12/03/2009 00:42 Re: Mplayer on Central [Re: geeknerd]
geeknerd
member

Registered: 24/09/2003
Posts: 148
I have mplayer down to under 6M. Also, I have ported PyTone to use mplayer, and it's working for MP3s and other local files. I'd like to tweak it to play internet radio and work with the buttons on the front of the rio. More to follow...

Top