This how-to
That includes:
ToDo:
This how-to explains the not-yet-so-easy-way to get the linux mediacenter working.
The biggest problem is, that the PS3 is too slow to play movies. BUT, you say, HOW can such a numbercruncher be slow at playing movies?
First, Sony does allow direct access to the graphic cpu, only to graphic output. This means that even such simple things as scaling an image or color conversation has to be done in software. This leads us to the second problem: the slow ass cpu. Sony advertises with “two 3,2ghz cpus” or something, but in reality, it feels like an Athlon with 1Ghz. This means, even heavy compiler optimized mplayer/xine/whatever are not capable of playing many movies smoothly and without lag.
The solution to this problem is to offload those simple, but computally expensive things to the seven SPUs, which are especially designed for those things, and with their help we can provide smooth video playing. We’re using the spu-medialib for this task. All this has nothing todo with the RSX hack which worked on pre 2.10 versions.
shortcomings:
Everything’s here: http://psubuntu.com/
more info here: http://linux.yes.nu/PS3Ubuntu/
Even pre-compiled vo-patched-mplayer packages are avaiable.
Follow those steps:
http://ps3wiki.qj.net/index.php/Gentoo_Howto
Optional:
http://ps3wiki.qj.net/index.php/Gentoo_-_The_next_step
Use this howto: howto install cell environment in gentoo (but we _dont_ need the CELLSDK21)
Or, in short:
# emerge rpm rpm2targz # emerge glut libXmu libXext
Get the following rpm’s from: http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ (not the “src” files!)
spu-binutils, spu-gcc, spu-gcc-c++, spu-gdb, spu-newlib, spu-newlib-debuginfo
Install with:
for x in *.rpm do rpm2tar $x done BUILDDIR=`pwd` cd / for x in $BUILDDIR/*.tar do sudo tar xvf $x done
Fix: spu medialib want the compiler as “spu-elf-gcc”
# ln /usr/bin/spu-gcc /usr/bin/spu-elf-gcc
Get the following files from http://www.bsc.es/plantillaH.php?cat_id=463
libspe2-2.2.?, libspe-devel2-2.2.?
As i’ve got 32bit Userland, i took those without “ppc64” (unsure if you have u32? test with “file /bin/bash”)
Install it as above, with “rpm2tar” and “tar”
paste the following into “/usr/lib/pkgconfig/libspe2.pc”: (or else spu-medialib cant find the libspe2 library)
prefix=$(prefix)
exec_prefix=$(exec_prefix)
libdir=$(libdir)
includedir=$(includedir)
Name: libspe2
Description: A wrapper library to adapt the JSRE SPU usage model to SPUFS
Version: 2.2.0
Requires:
Conflicts:
Libs: -L${libdir} -lrt -lpthread
Cflags: -I\${includedir}
Follow steps from: http://wiki.ps2dev.org/ps3:spu-medialib:install
or, in short:
# svn checkout svn://svn.ps2dev.org/ps3ware/trunk/spu-medialib spu-medialib # cd spu-medialib spu-medialib # aclocal && libtoolize --copy --force && automake --add-missing --foreign && autoconf spu-medialib # cd spu spu # aclocal && libtoolize --copy --force && automake --add-missing --foreign && autoconf spu # ./configure --host spu-elf spu # cd .. spu-medialib # ./configure --prefix /usr (ignore error due to previusly configured spu) spu-medialib # make && make install
Follow the steps in: http://forums.ps2dev.org/viewtopic.php?p=59150#59150
or, in short:
# svn checkout svn://svn.ps2dev.org/ps3ware/trunk/libps3fb libps3fb # cd libps3fb # aclocal # autoconf # automake --add-missing # ./configure # make && make install
Follow the steps in: http://forums.ps2dev.org/viewtopic.php?t=9187
or, in short:
# svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer # svn co svn://svn.ps2dev.org/ps3ware/trunk/mplayer-vo mplayer-vo # cd mplayer # patch -p0 < ../mplayer-vo/latest.patch # ./configure; # make && make install
# mplayer -vo ps3 -fs -zoom file.avi
some package installed the file “/etc/init.d/elfspe” on my system, which is not in a gentoo compatible format/syntax and produces an error while starting. Changing it is trivial. Maybe we dont even need it ?
Using CDB as database for portage instead of flat files does speed it up a little: http://gentoo-wiki.com/TIP_speed_up_portage_with_cdb
Use the following, sane, use-flags in make.conf:
USE="altivec X fbcon x264 xvid -opengl -kde -gnome -qt4 -qt3 -mplayer -sdl"
then, just emerge freevo:
emerge freevo
Note:
emerg’ing freevo will also install mplayer. I found no way to avoid it (i messed with “package.provided”, but it did not work). Finally, i installed the patched mplayer into /opt/mplayer/ (”./configure –prefix=/opt/mplayer/”). You also just can re-install the patched mplayer after emerging.
Get the following files from the freevo.tar.gz, and copy it to /etc/freevo/ and/or ~/.freevo/
contrib/ps3/freevo.conf contrib/ps3/local_conf.py
(see http://doc.freevo.org/FAQ#head-76f4d7283b6d458fbf780b0c613b66f04a1f6f2e)
and now the most important step: apply the following patch to /usr/lib/python2.5/site-packages/freevo/childapp.py (it also could be in python2.4/). Or else, your screen will be blank after mplayer quit’s, as freevo will not update the screen.
@@ -358,6 +358,8 @@
if pid == self.child.pid:
self.status = status
+ osd.stop()
+ osd.restart()
return True
return False
@@ -385,6 +387,9 @@
if self.stop_osd:
osd.restart()
+ osd.stop()
+ osd.restart()
+
if self.is_video:
rc.post_event(Event(VIDEO_END))
in the file freevo.conf, change
display = fbdev
to
display = ps3
if you want to use patched mplayer. Dont forget to adjust
mplayer = /usr/bin/mplayer
into
mplayer = /opt/mplayer/bin/mplayer
if you installed it there.
Then:
# mkdir ~/videos/ # freevo setup # freevo
TADA! Welcome to your new mediacenter.
Note: If freevo still does not reappear after exiting mplayer, unmerge freevo, download freevo 1.7.5 source, apply the little patch for childapp.py and install it manually with “python setup.py install”.
Last checked and updated: 22 Jan. 2007