PS3 Media Server as a Linux Service

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: PS3 Media Server as a Linux Service

Postby linux_fan » Wed Aug 11, 2010 11:03 pm

I have a prb that maybe someone here can help me with...
When i run the PS3MediaServer by '/etc/init.d/PS3MediaServer start' or by setting the 'update-rc.d PS3MediaServer defaults 60' to load the PS3MedisServer at bootup it seems that MKV movies won't play properly. The actual situation is that they will play scrambled for about 20 seconds and stop.

But if you navigate to my /pms/folder/ and run './PMS.sh' it seems that everything is runs just fine. Does anyone have any idea what this could be?
Thanks for the help everyone. :)

I am using: Linux Ubuntu 9.04 server and ps3 media server version is 1.20.409. I tried both STABLE 1.10.5 and the BETA 1.20.409. same behavior.

Thanks again
linux_fan
 
Posts: 4
Joined: Wed Aug 11, 2010 10:44 pm

Re: PS3 Media Server as a Linux Service

Postby lordemsworth » Thu Aug 12, 2010 4:32 am

A couple of questions:
1) Do you see an error in the debug.log?
2) Have you tried the pms-linux debian/ubuntu package? I'm running Lucid everything seems to be running ok.

Amir
lordemsworth
 
Posts: 28
Joined: Wed Jan 06, 2010 7:22 am

Re: PS3 Media Server as a Linux Service

Postby linux_fan » Thu Aug 12, 2010 12:53 pm

Thanks again for the quick reply Amir,

as for your questions:

1)No there is nothing different in the debug.log that i see in terms of when i run the application as a daemon vs when i run it directly from its folder:

# /etc/init.d/PS3MediaServer Start

or

# sh ./PMS.sh

I see this error in both cases:

[main] TRACE 21:22:30.653 Error in MediaInfo Library loading: Unable to load library 'mediainfo': libmediainfo.so: cannot open shared object file: No such file or directory
[main] TRACE 21:22:30.654 Make sure you have libmediainfo and libzen installed
[main] TRACE 21:22:30.654 The server will now use the less accurate ffmpeg parsing method

but i don't think it has anything to do with the problem i am having.

I found 3 scripts in the forum here for an init.d script and i tried them all [here are the results of that ]:
1) viewtopic.php?f=3&t=902 --> I did this one first and i noticed that on bootup the server starts but i can't watch anything because the PS3 can't decode any files, it says Currpted Data

With this script i can Start/Stop the daemon with the #/etc/init.d/PS3MediaServer Start and #/etc/init.d/PS3MediaServer Stop

so then i tried this one

2) viewtopic.php?f=3&t=902 --> The script in sanju's post and everything seemed to work. The server started at bootup and i was able to watch most videos. With this script i CANNOT Start/Stop the daemon with the #/etc/init.d/PS3MediaServer Start and #/etc/init.d/PS3MediaServer Stop

However the problem here was that it wasn't able to play any HD videos. MKV and m2ts was not playing. normal avi was fine. I saw same behavior when i run the application as a daemon vs when i run it directly from its folder:

# /etc/init.d/PS3MediaServer Start

or

# sh ./PMS.sh

meaning in both ways it wouldn't play MKV, m2ts ...

At this point i figured it had something to do with FFMPEG. so i followed the tutorial here : viewtopic.php?f=3&t=3437 untill the last step because i didn't want to use the BETA unstable version of the media server. Once that installation was done i ran # sh ./PMS.sh from the old application folder and voila it can now play the MKV and m2ts files. But then when i ran it as the daemon using # /etc/init.d/PS3MediaServer Start i am back to not being able to play the MKV, m2ts

At this point i searched for another init.d script and found the following:


3) viewtopic.php?f=3&t=154&start=40 and tried it. In this one i can 'start' and 'stop' the daemon and the server starts up at bootup. But again i have the problem of not being able to play the videos (MKV, M2ts ...).





So i also noticed that the 'PATH' inside the init.d script has to be right and if i am missing folders it won't work properly.
this is what i have

PMS_ROOT=/opt/pms
PATH=$PMS_ROOT:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/local/lib

As i mentioned before i am running Ubuntu 9.04 without X as a server in my basement and so i need the PS3Media server to launch and run as a daemon at bootup or even starting it through ssh terminal is fine at this point. When i launch it as # sh ./PMS.sh from terminal through ssh it launches the app on my laptop and everything works fine until i close the ssh connection, then no more PS3 media server. But if i run it from init.d script through ssh it keeps running after the ssh connection is closed, however i can't watch the MKV files. I looked everywhere for a solution but i have not been successful.

The GIST here is that PS3 Media Server is installed and working perfectly fine without any problems (plays all the expected video formats properly) on the server. The problem i am having is when i launch it as a service with an init.d script i cannot watch MKV, m2ts videos.

Thanks again for the help everyone and i apologize for the long post..



.
linux_fan
 
Posts: 4
Joined: Wed Aug 11, 2010 10:44 pm

Re: PS3 Media Server as a Linux Service

Postby lordemsworth » Thu Aug 12, 2010 7:09 pm

I'm not much of an expert to be able to break down those init files, but one thing you could do if you started the program from command line - use nohup.
That way when you logged out of your ssh session, PS3 Media Server would still be running.

bash prompt> nohup <path to PMS.sh>/PMS.sh
I know that this isn't the perfect solution - but you're going to need someone better versed in the scripts to help you.

Amir
lordemsworth
 
Posts: 28
Joined: Wed Jan 06, 2010 7:22 am

Re: PS3 Media Server as a Linux Service

Postby linux_fan » Thu Aug 12, 2010 8:29 pm

I installed the pms-linux debian/ubuntu package and it works perfectly like you said Amir. Thanks again for the help.

But now i want to further investigate what it did differently so i know what i was doing wrong. If i figure it out i will post. :) thanks again for the help.
linux_fan
 
Posts: 4
Joined: Wed Aug 11, 2010 10:44 pm

Re: PS3 Media Server as a Linux Service

Postby lordemsworth » Thu Aug 12, 2010 9:45 pm

You're welcome. If you want some advice (it's because I should have followed it myself ages ago) - I've been using PS3 Media Server for two years. I run around the forums to see how things are going - and the work that Paissad has done to ensure all the dependencies are in place,

I look at Linux as a great server offering and it's getting to the place where we are finally getting holistic packages for the complex stuff. You can try and figure out why a hand-rolled installation differs from a packaged installation, or you can enjoy your media.
;)

I'd recommend enjoying your media - and support the packagers.

Amir
lordemsworth
 
Posts: 28
Joined: Wed Jan 06, 2010 7:22 am

Re: PS3 Media Server as a Linux Service

Postby linux_fan » Fri Aug 13, 2010 2:27 pm

hahaha you do have a good point. :) it was just for my personal curiosity.

thanks again! :)

PS. i realized that its still not playing some MKV and the tsMuxeR wasn't working. i installed 'ia32-libs' by 'apt-get install ia32-libs' and its all working fine. Hope it helps someone.
linux_fan
 
Posts: 4
Joined: Wed Aug 11, 2010 10:44 pm

[Problem] /etc/init.d/ starts before IP available.connect fa

Postby nomec » Sun Aug 22, 2010 6:57 pm

1
so i added "/etc/init.d/pms-linux start" to startup programs and it starts and runs at system startup. the problem is it starts before the computer gets an IP so the server starts at 0.0.0.0 and then it fails to connect to the ps3. running "sudo /etc/ini.d/pms-linux restart" after the computer is started restarts it fine and then it gets the ip and connects.

2
running as service starts fine but it starts so early that it is not put in the taskbar/panel even though it is running. as b4 running "sudo /etc/ini.d/pms-linux restart" fixes the problem but wats the point of installing as system daemon if i have to restart anway....

3
service install by " sudo update-rc.d pms-linux defaults 60" -im newb and dont know what the "defaults 60" means i just saw it use here. this method had the same problems from 1 and 2.

4
i have no idea where the PMS.sh file is that is talked about here I think that is for older versions but i dont know.

installed pms-linux by adding your repo and the "sudo apt-get install pms-linux" but that didnt get the latest version so I "...--purge remove..." (i noticed that even with --purge the conf file did not delete from my home directory) and then installed with the lazy man script "wget -q --no-check-certificate https://svn.paissad.net/misc/stuffs/ins ... s-linux.sh -O - | bash" this gave me a newer version.

I have noticed that i have to restart pms-linux using root everytime if i want it to work bug free. if i run pms as a user via "pms-linux" command that pms connects to the ps3 but does not recongnized it as a ps3 but as "another media renderer other than PS3 has been detected..." And on top of that it has the "double tree" problem when run as a user via "pms-linux" command.

love the app and its simply awesome. just reporting in on a bug i have notice with the daemon for me

my info
lucid 10.04
pms-linux v1.20.409
nomec
 
Posts: 1
Joined: Sun Aug 22, 2010 6:41 pm

Re: PS3 Media Server as a Linux Service

Postby timpootle » Thu Nov 25, 2010 7:16 pm

the problem is it starts before the computer gets an IP so the server starts at 0.0.0.0 and then it fails to connect to the ps3. running "sudo /etc/ini.d/pms-linux restart" after the computer is started restarts it fine and then it gets the ip and connects.


I have exactly the same problem. Any ideas for a fix?
Code: Select all
tim@bigbluelinux:~$ cat /etc/init.d/pms-linux
#!/bin/bash
#
### BEGIN INIT INFO
# Provides:          pms-linux
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts pms-linux program.
# Description:       Java Upnp Media Server dedicated to PS3
### END INIT INFO


Maybe needs run level to be higher before starting? I'm not sure how to change this.

Tim Crumpton, Altrincham UK

my info
maverick 10.10
pms-linux v1.20.409
timpootle
 
Posts: 4
Joined: Thu Nov 25, 2010 7:07 pm
Location: Altrincham, UK

Re: PS3 Media Server as a Linux Service

Postby lostar » Sun Nov 28, 2010 4:37 pm

timpootle wrote:
the problem is it starts before the computer gets an IP so the server starts at 0.0.0.0 and then it fails to connect to the ps3. running "sudo /etc/ini.d/pms-linux restart" after the computer is started restarts it fine and then it gets the ip and connects.


I have exactly the same problem. Any ideas for a fix?
Code: Select all
tim@bigbluelinux:~$ cat /etc/init.d/pms-linux
#!/bin/bash
#
### BEGIN INIT INFO
# Provides:          pms-linux
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts pms-linux program.
# Description:       Java Upnp Media Server dedicated to PS3
### END INIT INFO


Maybe needs run level to be higher before starting? I'm not sure how to change this.

Tim Crumpton, Altrincham UK

my info
maverick 10.10
pms-linux v1.20.409


HACKS :)
1. Try to add $time $named into Required-Start section. It doesn't work for me.
2. Use sleep (he-he... speedup boot :)). sleep 10 sec work for me:
PS3MediaServer startup script:
Code: Select all
...
case "$1" in
    start)
   log_daemon_msg "Starting $DESC" "$NAME"
   sleep 10
   do_start
   case "$?" in
       0|1) log_end_msg 0 ;;
       2) log_end_msg 1 ;;
   esac
   ;;
...
lostar
 
Posts: 1
Joined: Sun Nov 28, 2010 4:29 pm

PreviousNext

Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 6 guests