The hunt for the perfect PS3 MPlayer+Freevo setup

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

The hunt for the perfect PS3 MPlayer+Freevo setup

Post by keepkool »

post title renamed. old post title was "Can Mplayer vo -ps3 Works/Display with SubTitles?"

you know where I get "The hunt for the perfect..." ;)
a small tribute to all devs envolved in that excelent post
..end of title note....

At last I setuped my ps3 with mplayer vo, and can view videos in many formats like divx, mkv etc.....with excelent speed and upscalling quality

thanks only to this forum;)

but now leaves one last question,
Can Mplayer vo -ps3 Works/Display with SubTitles?

I try some movies already tested and results is always, good speed and audio sync at 1080p via hdmi 1.3 cable but even when mplayer auto detects subtitles, I cant see it anywhere, maybe someone tells me the answear....(like buy a glasses)
its simple yes or no ;)
I be happy with it

Version
[root@localhost samba]# uname -a
Linux localhost.localdomain 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:13:52 EDT 2007 ppc64 ppc64 ppc64 GNU/Linux

[Log]
[root@localhost samba]# mplayer -vo ps3 -fs video.avi > video.log
mpg123: Can't rewind stream by 46 bits!
[vo_ps3] control: todo: handle UPDATE_SCREENINFO (32)
spu_yuv2argb_scaler: Starting Up
[root@localhost samba]#
[root@localhost samba]# cat video.log
MPlayer dev-SVN-r25760-4.1.2 (C) 2000-2008 MPlayer Team
AltiVec found
CPU: PowerPC
117 audio & 239 video codecs

Playing video.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 624x352 12bpp 23.976 fps 786.7 kbps (96.0 kbyte/s)
Clip info:
Software: VirtualDubMod 1.5.10.2 (build 2542/release)
SUB: Detected subtitle file format: subviewer
SUB: Read 755 subtitles.
SUB: Adjusted 82 subtitle(s).
SUB: Added subtitle file (1): ./video.srt
ps3 suboptions:
debug:0
noscale:0
noadj:0
snapshot:0
[vo_ps3] init_framebuffer: Initialized framebuffer & disabled console
FB is 1920x1080 at offset 0x0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16be, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16be (2 bytes per sample)
Starting playback...
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
[vo_ps3] query_format: Called for Planar YV12 (0x32315659)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
VO: [ps3] 624x352 => 624x352 Planar YV12 [fs]
[vo_ps3] query_format: Called for Planar YV12 (0x32315659)
[vo_ps3] config: Times called:0 Setting up for src=624x352, suggested dst=624x352, format=Planar YV12 (32315659)
vo_fs:0, vo_doublebuffering:1, vo_directrendering:0, vo_screenwidth:0, vo_screenheight:0
[vo_ps3] config: Set vo_screen(width/heigh) to 0x0, forced direct rendering, & double buffering
[vo_ps3] config: src_buf_siz=329472, src_stride[]={624,312,312}, src_p_siz[]={219648,54912,54912}
maxWxmaxH=1920x1080, offset=0
[vo_ps3] clear: Clearing buffers
[vo_ps3] init_framebuffer: Initialized framebuffer & disabled console
FB is 1920x1080 at offset 0x0
[vo_ps3] setup_scale: Using dest WxH:1914x1080
[vo_ps3] fix_scale: Adjusted image size to WxH:1904x1072
[vo_ps3] setup_screen: After mplayer aspect changes:
vo_dx/dy=8x4, vo_screenwidth/height=1920x1080, offset=7688
desired image size=1904x1072
powerpc64 not detected
manipulating adress space
[vo_ps3] init_spu_medialib: Initialized spu-medialib's spu_yuv2argb_scaler with:
624x352=>1904x1072, offset:7688, maxW:1920
spu_yuv2argb_scaler: SRC width 624,DST width 1904??% ??% ??,?% 0 0
spu_yuv2argb_scaler: SRC height 352,DST height 1072
spu_yuv2argb_scaler: DST offset 7688
spu_yuv2argb_scaler: Scaling, computing shuffle filters
spu_yuv2argb_scaler: Computing Crshuffle filter
spu_yuv2argb_scaler: Initiation completed
A: 2.8 V: 2.8 A-V: -0.005 ct: 0.036 69/ 69 5% 23% 1.6% 0 0
exit from SPU
spu context destroyed
[vo_ps3] cleanup_spu_medialib: Destroyed spu-medialib's scaler/converter
[vo_ps3] uninit: Cleaned up FrameBuffer and re-enabled console.
[vo_ps3] uninit: These SHOULD BE ZERO:
yuvcsc_not_ready:0
[vo_ps3] uninit: Statistics:
draw_frame calls:0
draw_slice calls:506
draw_image calls:68
flip_page calls:68
get_image calls:47
Played src video.avi (624x352) at 1904x1072

Exiting... (End of file)
Last edited by keepkool on Thu Jan 24, 2008 7:18 am, edited 3 times in total.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

130 views? none repply??
whats up none cares about mplayer subtitles???

strange
googling "ps3 mplayer subtitles"
links to this post
its already #2 POS LOL still up

maybe I deserve a special place in "The Incredible Hall Of Shame"

after waiting for a simple YES/NO repply....
and wait a bit longer....more...the repply never come, and I try it once more....

The answear is YES

its Works 100% with SubTitles and OSD, and its AWSOME.....
much better than I desired ;

like all the stuff, its a piece of cake when u know how!!!!
its so easy that reading the mplayer docs and have the RIGHT FONT installed (tricky here) even a baby do it........

If anyone cares about how work acelarated mplayer please read, else skip:
1) works with many video formats like divx, mkv
(I try some MKV and all look ok in 1080p but log some errors, maybe decompress speed/drop frames I dont rember)

2) works with subtitles with -vo ps3

3) works with OSD (kool)

4) works with 1920x1080p ant great speed and audio sync ;)

5) works for me (at last!)

final, my PS3 do what I wanna do when I buy it,
a silence linux server and media player ;)

and thanks to the devs in this forum that make all the goodies like ps3rsx, spu-medialib, vo patch, faqs etc etc etc.......

the other features like skins etc,
I will try latter after enjoy a movie with subtitles

You may close this post, If think this unusefull

...again sorry my english......its because of that I need subtitles...
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Good to know thx.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

ps2devman wrote:Good to know thx.
Thanks for your repply, Finally, Now I now that i´m not "invisible posting" LOL

I do my notes for the future and leave it here,
maybe someone can use it
(like me in the past, and spare some time)

Compile With
./configure --enable-menu
make
make install

Usefull Link
ftp://ftp.mplayerhq.hu/MPlayer/releases/fonts/

Fonts
ftp://ftp.mplayerhq.hu/MPlayer/releases ... 50.tar.bz2
ftp://ftp.mplayerhq.hu/MPlayer/releases ... -1.tar.bz2
ftp://ftp.mplayerhq.hu/MPlayer/releases ... -2.tar.bz2
ftp://ftp.mplayerhq.hu/MPlayer/releases ... -7.tar.bz2

Script
cd temp?????
wget ftp://ftp.mplayerhq.hu/MPlayer/releases ... 50.tar.bz2
tar -xf font-arial-cp1250.tar.bz2
cp font-arial-18-cp1250/* ~/.mplayer/font/
mplayer -vo ps3 -font ~/.mplayer/font/font.desc video.avi

you may think usefull and edit ~/.mplayer/config this way

cat ~/.mplayer/config

vo=ps3
fs=yes
monitoraspect=16:9
subfont-encoding=unicode
font= /root/.mplayer/font/font.desc

now
just launch it with mplayer <video>
forget the params

many more options and features are there, but I have to look at it, if I test some, and think its usefull for someone I report here......
the truth is that I´m a newer mplayer user, and never used it in the past,
I Dont know nothing about it,
But I will try to change this in the next spare time ;)

PS: I really likes the OSD
+ menu.conf and other config files LOL

Is any Tip for:
How can we use a Cheaper IRDA remote control with LIRC and PS3?

maybe a IRDA USB Dongle do the job if has compatible drivers for ps3 ppc linux......I dont try to find anything yet, maybe someone has a good one to tell

I must read something about mplayer, I just write but without know anything about it....

freevo seems a good choice after install a stable mplayer in ps3
and I will try to read a bit of both when I have spare time....

If Test&Try some usefull Thing about it I report here

Thanks Once Again ps2dev´s and all the PS* ppl out there

I´m Happy because they work 4 it.....
they deserve my RESPECT...
simple...
and I like to say it in uppercase ;)
ps3noob
Posts: 1
Joined: Mon Jan 21, 2008 7:08 am

Post by ps3noob »

@keepkool:

These are really great news !!

As you can understand (from nick and post#) I am quite new to the PS3 Linux scene.
I have YDL 5.0.2 installed on my PS3, what I would like to know:
- which Linux distro you use ?
- r u able to view movies in HD resolutions (720p/1080p) ? if so which codecs were used (h264/xvid/...)
- do you have links to guides for installing this mplayer, codecs...

Thanks !!
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

ps3noob wrote:@keepkool:
1) which Linux distro you use ?
2) r u able to view movies in HD resolutions (720p/1080p) ? if so which codecs were used (h264/xvid/...)
3) do you have links to guides for installing this mplayer, codecs...
Thanks !!
first thanks for the repply
next:

1) Fedora 7 with ps3rsx

2) I only test 4 or 5 movies, and 1 is Mkv , I prefer do other things than lost time test or vew movies, all I can say is that all that I test worked 100% at a great speed (with ps3rsc) :)
(read my mkv note somewhere above)

3) Its all here, in ps3dev, if not, ps2dev have links to outside world, or google for it, but belive me, the road is long and hard, and you must link all topics, links and docs, do notes, and try many things for yourself, its the only solution......dont give up....is the best I can say...but in the end...u learn a bit more ;)

....maybe someone make a guide from start to end...

If I had a fresh fc7 :)
I have my notes, but I require a fresh install, to start it from fresh,
maybe a friend of mine install fc7 ;)
this way has less or no step errors ;)

I think unbutu distros is easy,
have more info 4 ps3 and for rsx....
but I prefer fedora and suse :)

Last note I Install freevo and I must say that :
its AWSOME, when I saw its gui in my 40" 1080p I make a "happy kid face", the menus are quick and stable,
the mplayer works from start
without the need to do anything,
just select movie and enter LOL
and better with subtitles and sound :)

its a great combination for OUR ps3

..but its too easy...
and quick I found problems (this way it gives more fight/enjoy):

Problem 1) Launching freevo with 1920 gives me errors like

Code: Select all

WARNING&#58; /etc/freevo/lircrc not found!
Crash!&#58; String length does not equal format and resolution size
Traceback &#40;most recent call last&#41;&#58;
  File "/usr/lib/python2.5/site-packages/freevo/main.py", line 437, in <module>
    plugin.init&#40;splash.progress&#41;
  File "/usr/lib/python2.5/site-packages/freevo/plugin.py", line 309, in init
    callback&#40;int&#40;&#40;float&#40;current&#41; / len&#40;__all_plugins__&#41;&#41; * 100&#41;&#41;
  File "/usr/lib/python2.5/site-packages/freevo/main.py", line 231, in progress
    skin.draw&#40;'splashscreen', None&#41;
  File "/usr/lib/python2.5/site-packages/freevo/skins/main/main.py", line 530, in draw
    a.draw&#40;settings, object, menu, style, type, self.force_redraw&#41;
  File "/usr/lib/python2.5/site-packages/freevo/skins/main/area.py", line 187, in draw
    self.__draw_background__&#40;&#41;
  File "/usr/lib/python2.5/site-packages/freevo/skins/main/area.py", line 580, in __draw_background__
    image = pygame.image.fromstring&#40;file&#40;cache&#41;.read&#40;&#41;, &#40;bg.width,bg.height&#41;, 'RGBA'&#41;
ValueError&#58; String length does not equal format and resolution s
I skip his error for now with
#geometry = 1920x1080
geometry = 1918x1080 LOL it works, I can live without 2 pixels bars

Problem 2) When Mplayer stops Freevo Crashes

with display = ps3 (freevo.conf)

After view a movie or when we press ESC/Home Key to go to freevo menu/gui again, mplayer crashes, maybe because use ps3 display like freevo at same time, I must kill it, and only after reboot ps3 I have freevo working again

with
display = fbdev (freevo.conf)

all works 100%, but the movie dont upscall, but has subtitles too, the only BIG problem is the zoom/full screen,now we saw a small non-upscalled movie in the middle of the screen

without ps3rsx belive me the zoom and frame rate are a shame (thanks $0ny)

...if someone know how to use mplayer with freevo with
display = ps3
and without crash please tell me,
I have tryed some config options, but without luck....for now LOL
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

I dug into "Problem 2":
freevo does not crash, it just does not show anything anymore (with esc-esc-esc, and 5x-Down, then Enter, you can exit freevo, and everything works again, console etc. No need for reboot).

If you use display=fbdev, mplayer wont be accellerated, as it uses "-vo fbdev", not "-vo ps3". If you force mplayer to use -vo ps3 in local_conf.py, freevo still freezes.

i've checked the mplayer-vo=ps3 module code, and can say:
- it's not because vo_ps3.c open's the fbdev again (after libps3fb opens it _also_)
- it's not because of the "fix console blanking?" code (everything with filehandle "cd")

i think it has something todo with framebuffer init/uninit. I'll look into freevo source, maybe i stumble upon something...
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

anthraxx wrote:I dug into "Problem 2":
i think it has something todo with framebuffer init/uninit. I'll look into freevo source, maybe i stumble upon something...
I found out that if i use "OSD_STOP_WHEN_PLAYING=1" in local_conf.py, it works. The downside is that mplayer aint controllable anymore (no keys are working etc).

The following patch emulates the OSD_STOP_WHEN_PLAYING behaviour without breaking mplayer:

Code: Select all

--- freevo-1.7.5-orig/src/childapp.py        2007-10-21 18&#58;31&#58;51.000000000 +0000
+++ freevo-1.7.5/src/childapp.py    2008-01-22 14&#58;08&#58;40.000000000 +0000
@@ -358,6 +358,8 @@
 
         if pid == self.child.pid&#58;
             self.status = status
+            osd.stop&#40;&#41;
+            osd.restart&#40;&#41;
             return True
         return False
 
@@ -385,6 +387,9 @@
         if self.stop_osd&#58;
             osd.restart&#40;&#41;
 
+        osd.stop&#40;&#41;
+        osd.restart&#40;&#41;
+
         if self.is_video&#58;
             rc.post_event&#40;Event&#40;VIDEO_END&#41;&#41;
This means mplayer with vo=ps3 and freevo are working perfectly :-)
Last edited by anthraxx on Wed Jan 23, 2008 1:13 am, edited 1 time in total.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote: ...freevo does not crash, it just does not show anything anymore....
Thanks for the super TIP, I found this yesterday too :)

its like when it goes display the freevo gui, its shows the 1 movie pic frame, stops here, and never display freevo again, fooling the n00bs that was a crash
anthraxx wrote: If you use display=fbdev, mplayer wont be accellerated, as it uses "-vo fbdev", not "-vo ps3". If you force mplayer to use -vo ps3 in local_conf.py, freevo still freezes.
Yesterday When I found that freevo dont crash, I have more time to change and apply settings, because of the stupid reeboot process its a waste of time LOL

I try many things, like launch freevo with fbdev and call mplayer with -vo ps3 in local_conf with
MPLAYER_VO_DEV = 'ps3'
and it works, it uses ps3 and shows full screen, in theory freevo in fbdev and mplayer in ps3, but the result is the same, freevo never appears, only the 1 frame movie instead :(

Tryed also:
OSD_STOP_WHEN_PLAYING,
MPLAYER_NICE,
MPLAYER_ARGS_DEF (slave commands)
and other settings....but nothing that fixes it

I even look and modifies
/usr/share/freevo/freevo_config.py
and play a little......same result
anthraxx wrote: I think it has something todo with framebuffer init/uninit. I'll look into freevo source, maybe i stumble upon something..
thanks your precious help and time :)
I´m on work, and dont bring PS3 with me, but when I arrives home If I play with some settings and get a solution, I will post here too

I Think that this is the LAST Freevo Step that we need, to have a full ps3rsx acelarated media center, and belive me, always has a way, sometimes with 1 line of code, or just comment something, its hard to find, but a pleasure to bypass :)
(....I hope the solutions is in freevo settings/source code, if is from ps2rsx or vo patch, I never gets there LOL...)

After bypass this crash fb behavior,
I would like to continue install/find other things like emus, pluggins, skins, dvb, until we have all :)
in this road I may find more strange behaviors too, but like I said one step at a time, first mplayer/freevo crash behavior

PS-and the use of display=1918x1080 to bypass 1920x1080 crash, any solution??? like all of us, I like the things well done :)

Once Again, Thanks for the repply and help anthraxx
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

keepkool wrote: Tryed also:
OSD_STOP_WHEN_PLAYING,
MPLAYER_NICE,
MPLAYER_ARGS_DEF (slave commands)
and other settings....but nothing that fixes it

I even look and modifies
/usr/share/freevo/freevo_config.py
and play a little......same result
Hm, try again the OSD_STOP_WHEN_PLAYING="1", and make sure you use the correct config file. You CANT exit mplayer (or use it, as input is broken), but if you kill it (over ssh, "pkill mplayer"), the freevo menu reapears. Try it out. If it works, you can use my provided patch for freevo 1.7.5.
keepkool wrote: thanks your precious help and time :)
I´m on work, and dont bring PS3 with me, but when I arrives home If I play with some settings and get a solution, I will post here too

I Think that this is the LAST Freevo Step that we need, to have a full ps3rsx acelarated media center, and belive me, always has a way, sometimes with 1 line of code, or just comment something, its hard to find, but a pleasure to bypass :)
(....I hope the solutions is in freevo settings/source code, if is from ps2rsx or vo patch, I never gets there LOL...)

After bypass this crash fb behavior,
I would like to continue install/find other things like emus, pluggins, skins, dvb, until we have all :)
The PS3RSX patch is dead, as i also use the ps3 for gaming and had to upgrade. The mplayervo patch is a clean way and will work forever.

Next things for me are:
- get the external harddisc mounted at the right places with udev rules or similar
- find out how to change button behaviour of ps3 controller in mplayer/freevo as it sux right now
- get ps3 controller working without cable -> wireless (there's a thread in gentoo forums..)
- get spu-X working, get emulator working with ps3 controllers, get lots of NES/SNES games
- enjoy it! :-)

And you dont have to thank me, i also want to use my ps3 as mediacenter badly!
Last edited by anthraxx on Wed Jan 23, 2008 1:18 am, edited 1 time in total.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

after I repply your first post,
I found a new one, and this is the repply to your second post, the MPlayer Crash Behavior Solution
anthraxx wrote:I found out that if i use "OSD_STOP_WHEN_PLAYING=1" in local_conf.py, it works. The downside is that mplayer aint controllable anymore (no keys are working etc).
Yesterday I note that too,
I Think is because its working under slave mode,
and maybe with keys are disabled, if enabled it was a good solutions because this way we can use mplayer shortcuts instead (I prefer), we can also redefine keys freevo too, but is one more thing to do
anthraxx wrote:The following patch emulates the OSD_STOP_WHEN_PLAYING behaviour without breaking mplayer:
Great News, Unluckly or Luckly I´m at work, like I said, But when I arrives home, belive is the first thing I will do...and if problem skiped thanks to the snippet from "our" anthraxx, its time to go to other freevo/mplayer discoveries LOL
anthraxx wrote:This means mplayer with vo=ps3 and freevo are working perfectly :-)
I Presume that both using device=ps3 ;)

Later I will start with fresh freevo config files, and just change it with anthraxx fix and minimal settings like driver,
and post here the optimal freevo/mplayer settings

once more, thanks for your QUICK HELP,
and belive this is not like trying the keyboard, and says It works, its not a freevo crash, this is a problem that I will never Find without U :)

PS: I connect to home via ssh and edit the files,
but only can test later because of keyboard and screen
please confirm if the change is well applyed (TIA)

changed /usr/lib/python2.5/site-packages/freevo/childapp.py

Code: Select all

if pid == self.child.pid&#58;
  self.status = self.child.returncode
  return True
return False
change too

Code: Select all

if pid == self.child.pid&#58;
  self.status = self.child.returncode
  osd.stop&#40;&#41;
  osd.restart&#40;&#41;
  return True
return False
and

Code: Select all

if self.stop_osd&#58;
  osd.restart&#40;&#41;

if self.is_video&#58;
  rc.post_event&#40;Event&#40;VIDEO_END&#41;&#41;
too

Code: Select all

if self.stop_osd&#58;
  osd.restart&#40;&#41;

osd.stop&#40;&#41;
osd.restart&#40;&#41;

if self.is_video&#58;
  rc.post_event&#40;Event&#40;VIDEO_END&#41;&#41;
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

The change's you have done in childapp.py seem to be correct.
Tell me if it worked :-)

You were correct. Mplayer is used in "-slave" mode in freevo, but enabling OSD_STOP_WHEN_PLAYING does not actually enable the standard mplayer keys/input, as mplayer should receive them from something like a terminal/console, but we are just displaying the framebuffer. I remember seeing some mplayer key definitions somewhere in freevo, tought.

I'll update http://wiki.ps2dev.org/ps3:mediacenter, maybe you too want to incorporate some findings, interesting stuff etc in it.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:Next things for me are:
1) get the external harddisc mounted at the right places with udev rules or similar
2) find out how to change button behaviour of ps3 controller in mplayer/freevo as it sux right now
3) get ps3 controller working without cable -> wireless (there's a thread in gentoo forums..)
4) get spu-X working, get emulator working with ps3 controllers, get lots of NES/SNES games
5) enjoy it! :-)
2) have u tryed to play with local_conf.py here, I have tryed to setup it via bluetoth but I dont have achive that, I dont have Joy enabled, I cant Play With It

Code: Select all

# Here are the PS3 joy stick mappings
#JOY_CMDS = &#123;
#     'button 5'       &#58; 'UP',
#     'button 7'       &#58; 'DOWN',
#     'button 8'       &#58; 'LEFT',
#     'button 6'       &#58; 'RIGHT',
#     'up'             &#58; 'UP',
#     'down'           &#58; 'DOWN',
#     'left'           &#58; 'LEFT',
#     'right'          &#58; 'RIGHT',
#     'button 14'      &#58; 'SELECT',         # <circle>
#     'button 16'      &#58; 'EXIT',           # <square>
#     'button 15'      &#58; 'STOP',           # <x>
#     'button 1'       &#58; 'ENTER',          # <select>
#
#     'button 11'      &#58; 'VOL+',           # <L1>
#     'button 9'       &#58; 'VOL-',           # <L2>
#     'button 2'       &#58; 'MUTE',           # <L3>      
#
#     'button 10'      &#58; 'MUTE',           # <R2>
#     'button 4'       &#58; 'PLAY',           # <start>
#     'button 13'      &#58; 'PLAY',           # <start>
#     'button 17'      &#58; 'MENU',           # <ps> 
#&#125;
3) me too, after crash behavior, maybe i spent my night with it LOL

4) I like to view the emus too, but I dont play, its only to check the 2D speed etc

5) belive me, I already enjoy it, installing and break my head,
this is my flavour of "enjoy it" LOL
anthraxx wrote:And you dont have to thank me, i also want to use my ps3 as mediacenter badly!
belive me, I like to say thanks, and u deserves

maybe I can Help u in your "Next things for me are" in a near future ;)

PS: I leave here my feedback about your patch after try it at home
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:The change's you have done in childapp.py seem to be correct.
Tell me if it worked :-)
thanks, I will tell, when I gets home, here only via ssh like home, but in home has ps3 keyboard and TV :)
anthraxx wrote:You were correct. Mplayer is used in "-slave" mode in freevo, but enabling OSD_STOP_WHEN_PLAYING does not actually enable the standard mplayer keys/input, as mplayer should receive them from something like a terminal/console, but we are just displaying the framebuffer. I remember seeing some mplayer key definitions somewhere in freevo, tought.
I will check it too at night but check this first
www.mplayerhq.hu/DOCS/tech/slave.txt
anthraxx wrote:I'll update http://wiki.ps2dev.org/ps3:mediacenter, maybe you too want to incorporate some findings, interesting stuff etc in it.
Hey, its ONE of the guides that I use to start,
I must say awsome, can I (try to) contribute with a FC7 version?

Now I must Work, If not My Boss (me) Kills me LOL

Thanks once again, I leave feedback after work ;)
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:This means mplayer with vo=ps3 and freevo are working perfectly :-)
I Patch childapp.py with your changes,
But I dont see any changes,
The Freevo still has the same problem! Shows last movie frame when mplayer stops playing, and never shows freevo again

I tryed with many options too,
Like using display=fbdev or display=ps3 (freevo.conf)
Changed the
MPLAYER_VO_DEV or MPLAYER_VO_DEV_OPTS to ps3 (local_conf.py)

but the problem is always the same....
maybe later I try it again with success (I hope So)

If U can, please send me your related files by PM, This way I can check/compare (Tia)

Code: Select all

freevo.conf, freevo.conf, childapp.py
Or try to tell me what I can do, to put it work, based on your changes ;)

Thanks4All anthraxx
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

keepkool wrote:
anthraxx wrote:This means mplayer with vo=ps3 and freevo are working perfectly :-)
I Patch childapp.py with your changes,
But I dont see any changes,
The Freevo still has the same problem! Shows last movie frame when mplayer stops playing, and never shows freevo again
Hmm, maybe we dont have the same problem. I never saw a last frame of the movie, but just a blank (black) screen. This could be a problem with single/doublebuffering, maybe mplayer does not restore the correct framebuffer on exit, and freevo writes in the one which aint beeing displayed. But i dont know enough about this shit to tell :-(

the correct way would be:
- setting display=fbdev
- setting mplayer_vo_dev=ps3

but i'll send you the requestes files (later), maybe it helps.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:Hmm, maybe we dont have the same problem. I never saw a last frame of the movie, but just a blank (black) screen. This could be a problem with single/doublebuffering, maybe mplayer does not restore the correct framebuffer on exit, and freevo writes in the one which aint beeing displayed. But i dont know enough about this shit to tell :-(
make your words mine ;) "But i dont know enough about this shit to tell :-("

I expose the problem again:
1) First I Start Freevo with ps2 or fbdev (same), but require ps3 vo enabled to force fb behavior
2) Launch a any video, avi, mkv etc (same)
3) View the movie 1 sec or whole movie is the same, and I press ESC
4) The screen goes black imediately after I press ESC, I wait 1 or 2 sec, and Presto its shows me the last movie frame, and never leaves it
5) next we do the trick to shutdown (already reported here by U :)

It seems the problem is the same, Is a similar behavior, only u cant see the last frame......thats all
anthraxx wrote:the correct way would be:
- setting display=fbdev
- setting mplayer_vo_dev=ps3
but i'll send you the requestes files (later), maybe it helps.
I tryed this config yesterday too, dont work (for me), I tryed some changes in configs and sources (without success)

But this parameters seems the correct way to use freevo in ps3, because the freevo is vary fast with fbdev, and I think dont require the power of ps3 vo LOL, in fact I note that the gui speed is the same for ps3 and fbdev in freevo, this way we leave ps3 vo alone for mplayer and other pluggins ;)

Ok I hope we(U) can found this strange behavior/problem ;)

Maybe your files help too!
But if U have it working with your patch, Maybe its a problem here ;)

Thanks Again anthraxx (I will come back here later)
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

Another question
Can I change Post Title
"Can Mplayer vo -ps3 Works/Display with SubTitles?"??

It seems not apropriate now! because we already know that answear and because we follow other problem now ;)

We can label it more global like
"The hunt for PS3 MPlayer+Freevo Perfect Setup"
in honor to a well know post LOL
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

yeah, changing the post title would be an good idea, as most of the thread aint talking about subtitles :-)

hm, when i had the problem, it was going like:
1) start freevo
2) launch movie
3) press esc
4) black screen

now, it's like
1) start freevo
2) launch movie
3) press esc
4) for 1 or 2 sec, the console is shown (maybe last thing in framebuffer?)
5) freevo reappears

So, we have very similar problems, but maybe one little thing is different :-)

and for clarification:
the "display=ps3" was a hack from me; freevo does not know what "ps3" means, and uses "fbdev" as fallback, but still uses it as for the "-vo" parameter for mplayer.

What i did different from u was, i did my little freevo-patch in the extracted source of freevo, and then installed the patched version.
You changed the installed version. This should make no difference, but who knows. Also, my path was something like /usr/lib/python2.4/, so we have different python versions installed.
And, i use freevo-1.7.5. And gentoo.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:the "display=ps3" was a hack from me; freevo does not know what "ps3" means, and uses "fbdev" as fallback, but still uses it as for the "-vo" parameter for mplayer.
Yeah, I use it too, to force it, you are right, and this maybe why freevo is the same speed using both (fbdev/ps3)
anthraxx wrote:What i did different from u was, i did my little freevo-patch in the extracted source of freevo, and then installed the patched version.
maybe its why my freevo apparently does nothing ;)

Yes, I installed via RPMs with:

Code: Select all

freevo-1.7.5-1.kwizart.fc8.noarch.rpm
freevo-boot-1.7.5-1.kwizart.fc8.noarch.rpm
http://doc.freevo.org/SourceInstallation

I Have already do

Code: Select all

wget http&#58;//switch.dl.sourceforge.net/sourceforge/freevo/freevo-1.7.5.tar.gz
tar -zxvf freevo-1.7.5.tar.gz
cd freevo-1.7.5
but I cant/find the childapp.py inside "freevo-1.7.5" to patch!
anthraxx wrote:You changed the installed version. This should make no difference, but who knows. Also, my path was something like /usr/lib/python2.4/, so we have different python versions installed.
And, i use freevo-1.7.5. And gentoo.
I dont think it was a problem of python version, and freevo is the same version that I has installed, Gentoo or Fedora how Knows?

I think the solution is like u said before, "i did my little freevo-patch in the extracted source of freevo, and then installed the patched version"
I note that I change many things in childapp.py, like timers, your patch, and never view diferences, the only diferences is the compiled childapp.pyc changes is size, the rest the same

1) When u say install, you means "python setup.py install", In fact I never do that yesterday!! I dont play much with python sorry, only my dev scripts/plugins for komodo
2) Can u suggest a Title name For this Topic Too?

I Know I ask too much LOL

Tks pal ;)
Last edited by keepkool on Thu Jan 24, 2008 9:52 am, edited 2 times in total.
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

keepkool wrote:
anthraxx wrote:What i did different from u was, i did my little freevo-patch in the extracted source of freevo, and then installed the patched version.
maybe its why my freevo apparently does nothing ;)

I Have already do

Code: Select all

wget http&#58;//switch.dl.sourceforge.net/sourceforge/freevo/freevo-1.7.5.tar.gz
tar -zxvf freevo-1.5.0.tar.gz
cd freevo-1.5.0
but I cant/find the childapp.py inside "freevo-1.5.0" to patch!

1) When u say install, you means "python setup.py install", In fact I never do that yesterday!! I dont play much with python sorry, only my dev scripts/plugins for komodo
2) Can u suggest a Title name For this Topic Too?
the childapp.py is in the src directory:

Code: Select all

# cd freevo-1.7.5
# ls src/childapp.py 
src/childapp.py
either apply the changes yourself, or copy my childapp.py i've privmsg'd you.
Then install it with "python setup.py install", or with "python setup.py install -c -O1 -f" (i forgot which one i used to install, the second forces some stuff and enables optimizing).
But first deinstall your old version of freevo.

If it still does not work, you're fucked ;-)
I'll have another look at freevo and the mplayer patch, but it's working for me. Never change a running system ;-)

And, as it is your thread (you opened it by writing the first post), you can name it whatever you like. Like "The hunt for the perfect PS3 MPlayer+Freevo setup".
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:1) either apply the changes yourself, or copy my childapp.py i've privmsg'd you.

2) Then install it with "python setup.py install", or with "python setup.py install -c -O1 -f" (i forgot which one i used to install, the second forces some stuff and enables optimizing).
But first deinstall your old version of freevo.

3) If it still does not work, you're fucked ;-)

4) I'll have another look at freevo and the mplayer patch, but it's working for me. Never change a running system ;-)

5) And, as it is your thread (you opened it by writing the first post), you can name it whatever you like. Like "The hunt for the perfect PS3 MPlayer+Freevo setup".
note: I dont belive I dont saw the childapp.py at first, thanks to point that LOL

1) How can I Do that?
2) I Will do it Boss:)
3) LOL, Its seems so
4) Dont change it man ;)
5) title changed

Ok when I have time I do steps 2 and post here,
thanks anthraxx, without u this post is a Solo-Dead-Post, like a blog LOL
moreno
Posts: 5
Joined: Sun Dec 30, 2007 4:40 pm

Re: The hunt for the perfect PS3 MPlayer+Freevo setup

Post by moreno »

keepkool wrote: At last I setuped my ps3 with mplayer vo, and can view videos in many formats like divx, mkv etc.....with excelent speed and upscalling quality
can you make a complete tutorial for how you did this?
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Re: The hunt for the perfect PS3 MPlayer+Freevo setup

Post by keepkool »

You can start here
http://wiki.ps2dev.org/ps3:mediacenter by anthraxx ;)

And if need help, say so, if I can help :)
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

You are right again anthraxx, I follow your instructions, uninstall freevo rpm version, setup freevo from source and patch it, and presto! its fixed at first try ;)

Now we know that is not a distro problem and its not from ps3 vo (huff)
its running perfectly now on Fedora7 2.6.21-1.3194.fc7

my notes:

Code: Select all

wget http&#58;//switch.dl.sourceforge.net/sourceforge/freevo/freevo-1.7.5.tar.gz
tar -zxvf freevo-1.7.5.tar.gz
cd freevo-1.7.5
python setup.py install
mkdir /etc/freevo
mkdir ~/videos/
cp contrib/ps3/freevo.conf /etc/freevo
cp contrib/ps3/local_conf.py /etc/freevo
edit /usr/lib/python2.5/site-packages/freevo/childapp.py

Code: Select all

patch it with anthraxx patch
@@ -358,6 +358,8 @@
 
         if pid == self.child.pid&#58;
             self.status = status
+            osd.stop&#40;&#41;
+            osd.restart&#40;&#41;
             return True
         return False
         
@@ -385,6 +387,9 @@
         if self.stop_osd&#58;
             osd.restart&#40;&#41;
 
+        osd.stop&#40;&#41;
+        osd.restart&#40;&#41;
+
         if self.is_video&#58;
             rc.post_event&#40;Event&#40;VIDEO_END&#41;&#41;
Copy some Videos to ~/videos/ or change config files to point to your video directory

Launch It

Code: Select all

freevo
On Launch freevo If encounter this error like this:

Code: Select all

SyntaxError&#58; Non-ASCII character '\xc3' in file ./local_conf.py on line 1140, but no encoding declared; see http&#58;//www.python.org/peps/pep-0263.html for details
edit local_conf.py line 1140 and correct strange caracters and extra ' chars

With display=1920x1080

Code: Select all

Crash!&#58; String length does not equal format and resolution size
...
ValueError&#58; String length does not equal format and resolution size
use display=1918x1080 trick ;)

and remeber play a video and esc to menu, if using vo ps3 and you view freevo again you are a lucky man, and belive me, its nice to see it after 2 nights trying it :).
but now I can proceed with the "hunt"...with other plugins or configs...or read some related stuff, because a I dont read nothing yet LOL

Thats all Folks ;)

PS:I cant do that without anthraxx help, thanks man
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

I'm glad to hear that you got it working! :-)

i'm doing currently the following things:
- clean up freevo/mplayer configs
- start freevo automatically on linux startup (involves some gentoo config changes)
- make menu entrys for freevo for reboot (boot-game-os) and halt (this probably involves changing the standard theme)

i'll later post results and configs.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

anthraxx wrote:i'm doing currently the following things:
1) I'm glad to hear that you got it working! :-)
2) clean up freevo/mplayer configs
3) start freevo automatically on linux startup (involves some gentoo config changes)
4) make menu entrys for freevo for reboot (boot-game-os) and halt (this probably involves changing the standard theme)
i'll later post results and configs.
1) me too.....after that we can proceed with the "hunt" and start the funny part

2) has I note from yesterday, we only need to change
display = ps3 and change mplayer=mplayerbin in freevo.conf

3) I dont have gentoo, I cant help here...maybe I try do the same with my petitboot and FC8 in a near future, or someone colaborate it

4) Here I think I can help,
Ok, I will learn some basics of skins and try to make 2 beta buttons for halt and boot-game-os

When you talk about themes, are u propose a fresh new ps3 theme, or only do the basics: add the required buttons to halt and boot-game-os?

I can "try" to make a fresh PS3 theme based on "blue theme"
but we need a name like "PS3 Freevo Media Center" or any string that I can use to start with. If the guys here at PS2DEV allow we can use its name, this way we contribute a small part to this team

We can use pics of ps3 to make the theme, black based theme ;) or we can die trying LOL

I do many things, like design etc, but I´m not a Da Vinci OK!!!!

I think Another usefull thing is to add some related PS3 RSS Feeds to theme :)

....Waiting for your suggestions about theme "my friend" anthraxx...

....maybe, at night I can start the theme proccess and help a little :)
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

before I start working, I check freevo docs, and what we need seems very, very easy

please check out CommandsFxd
http://doc.freevo.org/CommandsFxd

we need to create 2 simple fxd´s (like ps3_halt.fxd and ps3_boot-game-os.fxd) and point that in local_conf.py plugins mainmenu ex:

Code: Select all

plugin.activate&#40;'command.CommandMainMenuItem', args=&#40;'/usr/local/freevo_data/Commands/ps3_halt.fxd', &#41;, level=45&#41;
plugin.activate&#40;'command.CommandMainMenuItem', args=&#40;'/usr/local/freevo_data/Commands/ps3_boot-game-os.fxd', &#41;, level=45&#41;
I do some stuff at night too ;)
But Like It seems in the past, freevo its an awsome application with good docs, powerfull configuration, and with source included, I think work we can achieve a kool PS3 MP :). Only the time will tell, But seems that ps2dev, mplayer and freevo teams, already do all the hard work for us. we just need to personalize it at will
PS3 - 60GB EUR - FW v1.55 + FC7
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Post by anthraxx »

A PS3 freevo theme would be nice, something like they did:
megabox: http://digg.com/linux_unix/PS3_Megabox_ ... ent_Phobes

other findings:

mplayer fonts
mplayer can use truetype fonts, just find one and link it:

Code: Select all

find / -name "*.ttf"
ln -s <ttf-file> ~/mplayer/subfont.ttf
Works great, i watched some Animes and Akira movies with subtitles.

start freevo on boot (in gentoo)

# cd freevo-1.7.5
# cp boot/gentoo-freevo /etc/init.d/freevo
# cp boot/gentoo-conf.d /etc/config.d/freevo

edit /etc/config.d/freevo, set freevo="yes".
edit /etc/init.d/freevo, delete the following line:

Code: Select all

sysctl -w dev.rtc.max-user-freq=1024 &> /dev/null
else, the init script will fail silently (because the sysctl does not exist).
When freevo is started in this way, my usb keyboard did not work in freevo, which aint that bad because i use the ps3controller. After exiting, the keyboard does work in console/bash.

Reboot/Halt option in freevo
I edited a file named "basic.fxd", it's in /usr/share/freevo/skins/main.
There, we could add a label "Reboot" and "Halt" after the "Shutdown" item. I tried that, but it was not shown. It could be because freevo uses the blurr theme at default (?), but i thought it all inherits from basic.fxd. Except that the (obsolete?!) README in the same directory states, that everything inherits from something like blue1_big_800x600, which does not exists?! And, maybe those .fxd theme files get compiled and saved in ~/freevo/vfs. Not very intuitive and clear, imho. I'll have another look at it later.
User avatar
keepkool
Posts: 59
Joined: Thu Oct 11, 2007 9:20 am
Location: Portugal

Post by keepkool »

I m in a rush, and I repply later to your post (3h),
but I leave some info here....

I just make the Theme :), and is in final phase now
its looking good, but spiderman(ps3) font dont have all the characteres like /, and I must change for other :(

halt and boot-game-os is working in commands menu and works as expect, like halt and boot-game-os (already tested),
I removed the halt and boot-game-os from main menu,
because I cant add pics to it, and use the commands main menu, this way we just crearte commands in fxd and it appears automatically, prevents us to create icons etc, just create commands in fxd and they are ready to roll :(
and I like all the pics in main menu, like video, pics, headlines etc
if someone knows how can we add images to
plugin.activate('command.CommandMainMenuItem', args=('/usr/share/freevo/fxd/ps3_boot-game-os.fxd', ), level=45)
please share with us

I post some shoots first, because I dont have finish packing the theme
and this way we can change ideas like theme author, theme release and slogans....

Some screenshots
Image
Image
Image
Image
Image
Image
Image
Image
Image

BigSize Shots Version
ps3themeshotsvb1.zip

Wainting for your feedback, and remeber please keep this post alive with me :)

PS-I repply to your Post Today :)
PS3 - 60GB EUR - FW v1.55 + FC7
Post Reply