AVS Forum banner
1 - 16 of 16 Posts

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #1 ·
My Gentoo 64bit userland install went well and after 2 days compiling, I have a working Gnome desktop on my PS3 with samba, lighttpd and sshd running too. Getting the PS3 to play my xvid+ac3 avi files was my biggest goal for Linux. Using the mplayer under Gnome, I was happy to see that my videos played back with no performance problems and my audio sync was fine. All of my tests were done on a 480i display (actually thru a $20 kworld PCI video-in card).


The first video I tested was high bitrate 4:3 avi, loaded both from the internal hard disk and from a burned DVD-R disc. The video specs were:
Quote:
Video: XVID 640x480 23.98fps 4312Kbps [Video 0]

Audio: Dolby AC3 48000Hz stereo 192Kbps [Audio 1]

CPU usage was something like 25% on one cpu core and maybe 9% on the other. I ran the test only in 480i mode, both 1 and 129 mode.


Another test I ran was to play a 720p encoded video (Pirates of the Caribbean 2 trailer) that I downloaded. It was:
Quote:
Video: XVID 1280x528 23.98fps 4585Kbps [Video 0]

Audio: MPEG Audio Layer 3 48000Hz stereo 102Kbps [Audio 1]

It was still played back at 480i, but again, it was flawless.


At any rate, I'm quite pleased with how things have turned out with PS3 Linux.


As for the graphics abilities of the framebuffer on the PS3, check out this post called Framebuffer hello world and performance measurement where the author wrote an test application to gauge the performance possibilites of using the SPUs to offload video functions. He achieved these results with 4 SPUs working:
Quote:
1080i: fps: 801 [6336 MB/Sec]

720p: fps: 1577 [5544 MB/Sec]

480i: fps: 2759 [3637 MB/Sec]

Even if Sony never adds GPU acceleration to OtherOS, I think we have the potential to be playing back HD videos soon enough (if we don't already).
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #3 ·
It should be able to handle mkv and mp4 containers but I don't know how well it could decode hi def h264 video yet. Sony says their decoder uses 3 SPEs for 1080p playback and right now none of the Linux decoders use any SPEs. But I'll try to download a 720p mp4 trailer as a test.


Next for me is to try and get oxine running.
 

·
Registered
Joined
·
2,500 Posts
Wow Awx, thanks a lot for posting. IIRC you had tried YDL with little success, right? Looks like Gentoo might be the answer for me then. Did you take time to document exactly what steps you've taken to get this far, so that in a few weeks you'd be able to answer questions if anything were to come up for someone trying this? Also I'm curious about the mkv H.264 files too, if you have time to check one out. A 15 mb sample should suffice for testing.


Edit: It's clear from those test program results that there's plenty of power there for HD playback of any kind. Really it's just a matter of the homebrew community optimizing a video player to use the SPE's. Any progress on that front from what you've been hearing?
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #6 ·
I looked into YDL but most of my (limited) Linux experience is with Gentoo. With all of the problems people had with YDL, I decided just to skip it entirely.


My steps were fairly simple. I did the 64bit stage4 install that is shown on this page
Installing Gentoo on a PS3

That takes about 45 minutes or so and leaves you with a command line Gentoo system (it also has X and Fluxbox installed but not running). Then it was just a trial-and-error process of setting the Gentoo USE flags and adding the ~ppc64 keyword to a few packages.


If you don't know what that means, it basically involves editing 3 text files to tell Gentoo what features you want and what non-stable packages you will allow on your system.


My /etc/make.conf USE flags look like this:
Quote:
USE="-opengl -qt3 -qt4 -arts -kde gtk gnome hal avahi lighttpd xvid dvd"

/etc/portage/package.use is:
Quote:
net-fs/samba swat

media-video/mplayer dvd aac xvid png jpeg

net-dns/avahi dbus

dev-lang/php cgi cli -apache -apache2 -mysql -mysqli gd

media-video/vlc dvd matroska daap png jpeg

and /etc/portage/package.keywords is:
Quote:
gnome-base/gnome ~ppc64

gnome-base/gnome-light ~ppc64

gnome-base/librsvg ~ppc64

gnome-extra/yelp ~ppc64

gnome-base/gnome-session ~ppc64

media-video/totem ~ppc64

www-client/epiphany ~ppc64

media-video/vlc ~ppc64

media-video/oxine ~ppc64

Then I ran this command to install gnome:
Quote:
emerge -DuN gnome

It stopped twice during the process- once because it couldn't download a file for libSDL and another time it was trying to install one package out of order. The out of order problem was probably because I used the "-DuN" switches in my emerge command.


For the download file, I went to this thread and manually downloaded the file listed there into my portage distfiles directory and restarted the emerge (it resumes). When the 2nd stop happened, I temporaryily ran another emerge command on the specific package it was complaining about missing so the command was:
Quote:
emerge -av libgnomeui

That went smoothly so then I just restarted the "emerge -DuN gnome" command again.


Once all the compiling was done, I ran a few of the commands from this page :
Quote:
rc-update add dbus default

rc-update add hald default

rc-update add avahi-dnsconfd default

rc-update add xdm default

echo "exec gnome-session" > ~/.xinitrc

Then changed the file /etc/rc.conf to have this
Quote:
DISPLAYMANAGER="gdm"

XSESSION="Gnome"

Then I restarted and Gnome was running.


To get the media players installed, I ran:
Quote:
emerge -DuN mplayer vlc oxine

Just a note, the Gentoo PS3 users have set up a binary GRP repository so you can skip the 2 day compile times and download pre-compiled packages. I did that on the previous 32bit Gentoo install last week but decided to just compile this time.


To play back a video, I ran this command from a terminal window running in the gnome desktop:
Quote:
mplayer -vo x11 -ao oss -fs -zoom -sws 0 /datafiles/Video/Pirates\\ Of\\ The\\ Caribbean\\ -\\ 2\\ -\\ Dead\\ Man\\'s\\ Chest\\ \\(2006\\)\\ Trailer.avi
 

·
Registered
Joined
·
2,500 Posts
Wow, that's a great write-up awx, thanks again! I'm getting pretty excited about doing this. What's held me back is that although I'm very familiar with computers and also text-based interfaces, I have no experience at all with modern versions of Linux. My only experience in this area is just using Unix server prompts for programming way back in the day.


Geez though, no graphical file manager and file associations to enable a more visual interface in order to I dunno, like double-click on a video file to have it start playing?
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #8 ·
Yeah, running videos thru the command line sucks. The Gnome file manager is there but I still have to figure out how to change what it does on a double click to a file. Right now it doen't do anything when I double click an avi file. My "start menu" entries for VLC and mplayer don't seem to work either.



Just have to get time and research what is wrong and how to fix them. Unfortunately, that is how Gentoo works - trial and error.


On the good news front, it recognizes all the DVD and flash card slots on the 60 gb PS3. Seem to work inside Gnome as you would expect them too.


I hope once the developers learn the ins and outs of the PS3, we get a really easy HTPC distro that is easy to install.
 

·
Registered
Joined
·
382 Posts
I have a very similar setup. I've installed Gentoo, but I use KDE instead.


I've had some troubles with the Audio breaking which requires tedious audio server shut down, start up, so I am in the process of re-installing my KDE (I think it's Linux / KDE issue.) From time to time, I was able to get them to work flawlessly.


Can you please share your MPlayer USE settings? Or did you just grab the binary?


During my last install, using samba to mount a network drive, I was able to stream directly from my WinXPPC. My TV is 1080P Sony (XBR2 SXRD) w/ HDMI. So, I tested matroska h264 video via network.


At their normal video aspect ratio, both players (Mplayer and VLC) played beautifully. But when I applied software scaling to blow it up at 1080P, the MPlayer became sluggish, and started skipping frames, and began to produce video artifacts (lower half of the screen continued to flicker). However, VLC continued to perform.


I am in the process of re-installing everything from scratch using the new 64-bit userland tarball, but I am going to take some additonal care to make sure that I disable any pre-set settings are that are not PS3 relevant to be removed. Can you please share your USE settings for MPlayer, and VLC if you have it?


Thanks.
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #11 ·
Hey asong26. I've been reading your posts at the Gentoo forums. Sorry to hear about that sound problem. But you seem to be pretty far along. Good to hear that 720p videos can play back at least, surely someone will optimize the scaling for the PS3.


This is my first serious time using desktop Linux and media players so I haven't done any optimization to mplayer. I don't know much about the different AV players in Linux and nothing about which sound systems work best. But the settings I compiled with were:

USE="-opengl -qt3 -qt4 -arts -kde gtk gnome hal avahi lighttpd xvid dvd"

media-video/vlc dvd matroska daap png jpeg

and played back with the command from the Gentoo thread:

mplayer -vo x11 -ao oss -fs -zoom -sws 0 /video.avi


I noticed a few changes in the newer stage4s. They have changed the CPU flags a lot. It is no longer optimized for 970 PPC but have left just the plain O2 setting. Someone on IRC said he noticed a 30% speedup in some benchmark with the simple flags so I guess that's why they switched them. But other than that, I've not noticed any real difference between the 64 and 32 bit stages.
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #12 ·

Quote:
Originally Posted by asong26 /forum/post/0


I am surprised to see that you're not using ffmpeg, nor enabling ffmpeg flags for mplayer nor VLC.....

I think it is being used. See this screenshot that is happening right before the video starts.
 

·
Registered
Joined
·
2,500 Posts

Quote:
Originally Posted by asong26 /forum/post/0


So, I tested matroska h264 video via network.

...

However, VLC continued to perform.

Music to my ears.
Hopefully at only 720p it would work just fine. Did you try that asong, and just let your TV scale to 1080? Yeah, a smaller desktop but 1280x720 would still probably be ok.
 

·
Registered
Joined
·
176 Posts
But are you able to play video full screen? As other poster mentioned, it works fine in a window at 1:1 resolution, but in full screen you get many dropped frames and visual problems as well. mplayer or vlc, it's the same (well, not quite the same issues but end result is the same). I compiled mplayer myself, and used existing packages for vlc. I was using YDL. Basically, I found out video playback is definitely not ready for prime time yet. I was running in full 1080p resolution so perhaps it was overloaded as it has to do everything in software, but I certainly wouldn't consider dropping the screen resolution to be a valid fix.


Is anyone working on adding SPE support to these applications? Were there any news on that front? At one point I was considering looking into mplayer source code myself but then I discovered the PS3 is not as quiet as it needs to be in order to be used as media center, so I gave up.
 

·
Registered
Joined
·
1,339 Posts
Discussion Starter · #15 ·
Fullscreen was what I was using. The mplayer OSD was working too. The mouse wheel would scrub through the file and the OSD would show a bar indicating where in the file it was.


And it's quiet here.
 

·
Registered
Joined
·
382 Posts

Quote:
Originally Posted by aos007 /forum/post/0


But are you able to play video full screen? As other poster mentioned, it works fine in a window at 1:1 resolution, but in full screen you get many dropped frames and visual problems as well. mplayer or vlc, it's the same (well, not quite the same issues but end result is the same). I compiled mplayer myself, and used existing packages for vlc. I was using YDL. Basically, I found out video playback is definitely not ready for prime time yet. I was running in full 1080p resolution so perhaps it was overloaded as it has to do everything in software, but I certainly wouldn't consider dropping the screen resolution to be a valid fix.


Is anyone working on adding SPE support to these applications? Were there any news on that front? At one point I was considering looking into mplayer source code myself but then I discovered the PS3 is not as quiet as it needs to be in order to be used as media center, so I gave up.


On 720P resolution of Gentoo / KDE, I was playing this file over the network at full screen without a single frame drop, nor sound sync issues. And as posted above, I was compiling mplayer in the background while this was going on!


MPlayer is slightly less robust on the performance side. I've test all resolutions via kboot res selector. VLC is the only one that gave me consistent result at full screen.


Once Sony grants us Hypervisor calls for 2D acceleration, this thing is going to rock!!! Frankly, I really don't care about any 3D acceleration right now. I just want 2D acceleration and custom resolution support. I am still getting those pesky over scan issues where I get these 2 inch black bars on my screen regardless of the resolution I choose.


Right now there's only 2 SPEs supported. And you need to make sure that your config files are set to leverage these 2 SPEs for anything you compile locally. I am pretty certain that the precompiled packages (GRP) are compiled using 2 SPEs. I don't think Sony has allowed access to more than 2 SPEs as of yet.

Quote:
CFLAGS="-mcpu=G5 -O2 -maltivec -mabi=altivec -pipe -fno-strict-aliasing"

CHOST="powerpc64-unknown-linux-gnu"

CXXFLAGS="${CFLAGS}"

LDFLAGS="-Wl,-O1"


MAKEOPTS="-j2"


USE="altivec nptl nptlonly"

It's extremely important that these lines are showing in your /etc/make.conf file before you emerge anything. Otherwise, whatever you compile on your machine will not be able to run with the available SPEs
 
1 - 16 of 16 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top