Working on OpenSolaris 2009.06... but how to do headless???

General discussion about PS3 Media Server (no support or requests)

Working on OpenSolaris 2009.06... but how to do headless???

Postby adamretter » Mon Jun 08, 2009 10:37 pm

Hi there,

After a lot of fiddling around I have managed to get ps3mediaserver 1.10.5 working on the just released OpenSolaris 2009.06 using the provided linux package. The problem was not so much ps3mediaserver, but rather its dependencies i.e. mplayer, mencoder and ffmpeg - anyways I have it going and I can watch films on our PS3 - I will soon post a blog article about how to achieve this for anyone who is interested...

The only issue I have is that I cant see how to run ps3mediaserver headless??? e.g. once I have launched it with the GUI and set the configuration options, I would like to be able to run it in headless mode from the console, so that I can install it as a service into the OpenSolaris Service Management Framework and have ps3mediaserver start up and shut down when my machine does. I have already written the descriptors and scripts to use ps3mediaserver with the Service Management Framework (which I will happily share), but I need a headless mode of operation to achieve this. Any thoughts?

Cheers Adam
adamretter
 
Posts: 10
Joined: Mon Jun 08, 2009 10:30 pm

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby shagrath » Tue Jun 09, 2009 12:01 am

Code: Select all
./PMS.sh console
shagrath
Project Lead
 
Posts: 2668
Joined: Wed Jan 14, 2009 1:39 pm

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby AustinPowersISU » Tue Jun 09, 2009 3:05 am

I've been trying to get it to work on OpenSolaris 2009.06 for quite some time now.

I can get it to stream no problem, but the second I try to transcode anything I get this error:

[Thread-120] TRACE 20:59:03.676 Starting transcode/remux of test.avi
[mencoder] TRACE 20:59:04.312 Process mencoder has a return code of 11! Maybe an error occured... check the log file

When I check debug.log, I see:

[Thread-64] DEBUG 20:58:47.025 [NULL @ 8952ec0]Invalid and inefficient vfw-avi packed B frames detected
[Thread-64] DEBUG 20:58:47.027 Input #0, avi, from 'test.avi':
[Thread-64] DEBUG 20:58:47.027 Duration: 00:48:16.72, start: 0.000000, bitrate: 1017 kb/s
[Thread-64] DEBUG 20:58:47.027 Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
[Thread-64] DEBUG 20:58:47.027 Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s
[Thread-64] DEBUG 20:58:47.027 At least one output file must be specified
[pool-4-thread-1] DEBUG 20:58:47.031 EOF
[pool-4-thread-1] DEBUG 20:58:47.031 Ready to Stop: true
[pool-4-thread-1] DEBUG 20:58:47.032 Media info of : test.avi / mimeType: video/avi / container: avi / bitrate: 1041408 / size: 368355690 / codecV: mpeg4 / duration: 00
:48:16.720 / width: 624 / height: 352 / frameRate: 23.98 / thumb size : 0
audio: id=1 / lang: und / codec: mp3 / sf:48000
[Thread-9] DEBUG 20:58:47.032 End of analysis
[Thread-9] DEBUG 20:58:47.038 Wrote on socket: Server: SunOS-x86-5.11, UPnP/1.0, PMS/1.10.5
[Thread-9] DEBUG 20:58:47.038 Wrote on socket: Content-Length: 10154
[Thread-9] DEBUG 20:58:47.038 Wrote on socket:
[Thread-9] DEBUG 20:58:47.039 Close Connection
[Thread-22] INFO 20:58:48.701 Stopping process: ffmpeg
[Thread-22] DEBUG 20:58:48.702 Killing the Unix process: 19766
[Thread-27] INFO 20:58:48.731 Stopping process: ffmpeg
[Thread-29] INFO 20:58:48.787 Stopping process: ffmpeg
[Thread-27] DEBUG 20:58:48.787 Killing the Unix process: 19765
[Thread-29] DEBUG 20:58:48.787 Killing the Unix process: 19764
[Thread-70] DEBUG 20:58:48.787 kill: 19766: No such process
[Thread-22] INFO 20:58:48.787 Destroying buffer
[Thread-37] INFO 20:58:48.885 Stopping process: ffmpeg
[Thread-37] DEBUG 20:58:48.908 Killing the Unix process: 19768
[Thread-22] INFO 20:58:48.958 Destroying buffer
[Thread-72] DEBUG 20:58:48.958 kill: 19764: No such process
[Thread-27] INFO 20:58:48.958 Destroying buffer
[Thread-73] DEBUG 20:58:48.981 kill: 19765: No such process
[Thread-29] INFO 20:58:48.958 Destroying buffer
[Thread-76] DEBUG 20:58:48.981 kill: 19768: No such process
[Thread-42] INFO 20:58:49.041 Stopping process: ffmpeg
[Thread-47] INFO 20:58:49.110 Stopping process: ffmpeg
[Thread-37] INFO 20:58:49.110 Destroying buffer
[Thread-29] INFO 20:58:49.110 Destroying buffer
[Thread-42] DEBUG 20:58:49.084 Killing the Unix process: 19767
[Thread-52] INFO 20:58:49.178 Stopping process: ffmpeg
[Thread-27] INFO 20:58:49.178 Destroying buffer
[Thread-47] DEBUG 20:58:49.178 Killing the Unix process: 19769
[Thread-37] INFO 20:58:49.269 Destroying buffer
[Thread-61] INFO 20:58:49.320 Stopping process: ffmpeg
[Thread-61] DEBUG 20:58:49.320 Killing the Unix process: 19772
[Thread-52] DEBUG 20:58:49.269 Killing the Unix process: 19770
[Thread-57] INFO 20:58:49.320 Stopping process: ffmpeg
[Thread-67] INFO 20:58:49.415 Stopping process: ffmpeg
[Thread-42] INFO 20:58:49.415 Destroying buffer
[Thread-78] DEBUG 20:58:49.415 kill: 19767: No such process
[Thread-67] DEBUG 20:58:49.415 Killing the Unix process: 19773
[Thread-57] DEBUG 20:58:49.393 Killing the Unix process: 19771

This goes on for quite a while, then the application basically restarts

Sometime I see a segmentation fault, but I can't reproduce that now for some reason.

Compiled lame-398, mplayer-export-2009-06-07, and, ffmpeg-export-2009-06-08 from source.

Now THAT was chore too....

I've tried various other versions too, no go!

So that's why I'm curious if you can transcode! :)
AustinPowersISU
 
Posts: 14
Joined: Tue Jun 09, 2009 2:55 am

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby adamretter » Tue Jun 09, 2009 8:58 am

Hmmm... how can I make sure that I am transcoding?
(Sorry I am a bit new to all this)
I did see an error that vlc was missing so I might well try and add that later today...

Looks like you did a much better job than me! I only compiled MPlayer 1.0rc2 from source. I could not get ffmpeg to compile from source at all - I also tried SFE but couldnt seem to get any packages to build. Otherwise xvid, faad, lzo and ffmpeg were installed from Blastwave.
Do you have a write up on how you achieved this anywhere? It would be good if we could document some sort of working process and get it up on the ps3mediaserver website for others. Or even better create an IPS for ps3mediaserver.
adamretter
 
Posts: 10
Joined: Mon Jun 08, 2009 10:30 pm

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby AustinPowersISU » Tue Jun 09, 2009 2:20 pm

The only documentation is in my head. It was a bunch of guessing and checking.

What I will do within the next couple of days is uninstall my compiled versions and re-compile from scratch, documenting as I go. It'll be much more 'sane' this time around :)

I kinda had to 'hack' mplayer and ffmpeg to compile (the latest nightly versions). This was a 'last ditch' effort to try and solve my problems. I'd feel more comfortable using the versions you listed (which is what I did for the majority of testing).

As far as transcoding goes, you should hopefully see a directory called #transcode# or something within each video directory. If you change to that directory and click on any movie there, it'll force PS3 Media Server to transcode, even if your PS3 has native support for the format.

BTW I didn't install any codecs... That could be part of my problem. I'm new to the mplayer world, so I don't know much about it!

On a final note, last night I tried to get everything to work in a Centos 3.9 BrandZ zone in OpenSolaris. Got everything installed, but PS3 media server couldn't launch because it couldn't get any information about the network interfaces (BrandZ zones inherit a bunch of networking goop from the global zone, so this is understandable).
AustinPowersISU
 
Posts: 14
Joined: Tue Jun 09, 2009 2:55 am

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby adamretter » Tue Jun 09, 2009 7:20 pm

Okay so I tried the transcoding and it failed. The problem seems to be mencoder rather than ps3mediaserver - looking at debug.log I see this -

[Thread-135] TRACE 18:58:16.284 Starting transcode/remux of nedivx-1408.avi
[Thread-135] DEBUG 18:58:16.285 Searching an audio track with lang: eng
[Thread-135] DEBUG 18:58:16.289 Searching an audio track with lang: fre
[Thread-135] DEBUG 18:58:16.294 Searching an audio track with lang: jpn
[Thread-135] DEBUG 18:58:16.299 Searching an audio track with lang: ger
[Thread-135] DEBUG 18:58:16.303 Choosed a default audio track: Audio: MP3 / lang: und / ID: 1
[Thread-135] DEBUG 18:58:16.305 Searching a subtitle track with lang: eng
[Thread-135] DEBUG 18:58:16.305 Searching a subtitle track with lang: fre
[Thread-135] DEBUG 18:58:16.305 Searching a subtitle track with lang: jpn
[Thread-135] DEBUG 18:58:16.305 Searching a subtitle track with lang: ger
[mkfifo] INFO 18:58:16.501 Starting mkfifo --mode=777 /var/tmp/javaps3media/mencoder1244570296500
[mencoder] INFO 18:58:16.561 Starting mencoder -ss 0 -quiet /thevault/public/Films/1408.DC.DVDRip.XviD-NeDiVx/nedivx-1408.avi -quiet -quiet -oac lavc -of mpeg -lavfopts format=asf -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=384:threads=4:keyint=1:vqscale=1:vqmin=2 -quiet -nofontconfig -subcp cp1252 -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1.0 -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 24000/1001 -quiet -quiet -mc 0.1 -af lavcresample=48000 -srate 48000 -o /var/tmp/javaps3media/mencoder1244570296500
[mencoder] INFO 18:58:16.604 Reading pipe: /var/tmp/javaps3media/mencoder1244570296500
[mencoder] DEBUG 18:58:16.605 Opening file /var/tmp/javaps3media/mencoder1244570296500 for reading...
[mencoder] INFO 18:58:18.048 Attaching thread: mencoder
[Timer-1] DEBUG 18:58:18.049 Buffered Space: 0 bytes / inputs: 0
[Thread-141] DEBUG 18:58:18.050 MEncoder 1.0rc2-3.4.3 (C) 2000-2007 MPlayer Team
[Thread-138] DEBUG 18:58:18.050 Limiting audio preload to 0.4s.
[Thread-141] DEBUG 18:58:18.050 CPU: Intel(R) Atom(TM) CPU 330 @ 1.60GHz (Family: 6, Model: 28, Stepping: 2)
[Thread-141] DEBUG 18:58:18.051 CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
[Thread-141] DEBUG 18:58:18.051 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
[Thread-141] DEBUG 18:58:18.052 success: format: 0 data: 0x0 - 0x2b44b534
[Thread-138] DEBUG 18:58:18.052 Increasing audio density to 4.
[Thread-141] DEBUG 18:58:18.053 AVI file format detected.
[Thread-141] DEBUG 18:58:18.053 [aviheader] Video stream found, -vid 0
[Thread-141] DEBUG 18:58:18.053 [aviheader] Audio stream found, -aid 1
[Thread-141] DEBUG 18:58:18.053 AVI: ODML: Building ODML index (2 superindexchunks).
[Thread-141] DEBUG 18:58:18.053 VIDEO: [XVID] 624x256 12bpp 23.976 fps 727.4 kbps (88.8 kbyte/s)
[Thread-141] DEBUG 18:58:18.054 [V] filefmt:3 fourcc:0x44495658 size:624x256 fps:23.98 ftime:=0.0417
[Thread-141] DEBUG 18:58:18.054 ==========================================================================
[Thread-141] DEBUG 18:58:18.054 Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
[Thread-141] DEBUG 18:58:18.054 AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
[Thread-141] DEBUG 18:58:18.054 Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
[Thread-141] DEBUG 18:58:18.054 ==========================================================================
[Thread-141] DEBUG 18:58:18.054 PACKET SIZE: 2048 bytes, deltascr: 884
[Thread-141] DEBUG 18:58:18.054 Opening video filter: [expand osd=1]
[Thread-141] DEBUG 18:58:18.055 Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
[Thread-141] DEBUG 18:58:18.055 ==========================================================================
[Thread-141] DEBUG 18:58:18.055 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[Thread-141] DEBUG 18:58:18.055 Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
[Thread-141] DEBUG 18:58:18.055 ==========================================================================
[Timer-1] DEBUG 18:58:20.050 Buffered Space: 0 bytes / inputs: 0
[Timer-1] DEBUG 18:58:22.060 Buffered Space: 0 bytes / inputs: 0
[mencoder] DEBUG 18:58:22.151 EOF
[mencoder] TRACE 18:58:22.152 Process mencoder has a return code of 11! Maybe an error occured... check the log file
[mencoder] INFO 18:58:22.152 Stopping process: mkfifo



If I run the mencoder command from the debug.log standalone then it eventually segfaults -
Segmentation Fault (core dumped)


So I guess what we really need is a decent and working mplayer/mencoder/ffmpeg build for OpenSolaris. Perhaps when you rebuild your stuff we will learn something important...
adamretter
 
Posts: 10
Joined: Mon Jun 08, 2009 10:30 pm

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby AustinPowersISU » Tue Jun 09, 2009 8:28 pm

That is the same final error messages that happens to me (the error 11). Doh!

In looking at my logs, I wasn't sure if it was ffmpeg or mencoder that has the problem. It's mencoder that shows the error, but I don't know enough about how the programs interact to know for sure.

This line has me a tad baffled:

[Thread-64] DEBUG 20:58:47.027 At least one output file must be specified

I THINK that's ffmpeg complaining.

But it's mencoder that eventually says 'game over' :)

I don't see 'At least one output file must be specified' in your output, so something slightly different is going on, but same end result.
AustinPowersISU
 
Posts: 14
Joined: Tue Jun 09, 2009 2:55 am

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby AustinPowersISU » Tue Jun 09, 2009 8:34 pm

I am going to work on rebuilding sources tonight after work. I'll post documentation in this thread when done. I won't promise I'll get it all done tonight, but I'll try. You can then laugh at my 'hacks' to get the most recent versions to compile of mplayer and ffmpeg :)
AustinPowersISU
 
Posts: 14
Joined: Tue Jun 09, 2009 2:55 am

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby adamretter » Tue Jun 09, 2009 8:46 pm

Out of interest I thought I would just tru using the MPlayer/mplayer from Blastwave. After installing it, it seems to be a much more recent version that Blastwave was reporting - i.e. 1.0rc1-3.4.5.

I just tried it but it didnt work as ps3mediaserver sends some suboptions to mencoder's -mpegopts which are not supported in the earlier version. i.e. vbuf_size and abuf_size. I am just looking to see if I can configure/change what options ps3mediaserver is sending to mencoder.
adamretter
 
Posts: 10
Joined: Mon Jun 08, 2009 10:30 pm

Re: Working on OpenSolaris 2009.06... but how to do headless???

Postby adamretter » Tue Jun 09, 2009 9:10 pm

Regarding ps3mediaplayer passing mpegopts suboptions to the older mencoder that dont work, I found this post - viewtopic.php?f=3&t=2443&p=10343&hilit=mpegopts#p10343

So it would seem that using the oldern mencoder from Blastwave is not an option :-/
adamretter
 
Posts: 10
Joined: Mon Jun 08, 2009 10:30 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests