Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PS3mediaserver

Featured Replies

just so you are aware Lacehim:

 

By installing the "glibc-solibs-2.13-i486-4.txz" pacakge on 4.7 you most likely broke xargs.

 

I am not sure how you installed SAB or SickBeard but my packages will probably not work since the install of the above mentioned package.

 

As for scripts to start and stop PS3media server.  Take a look at ans of the unMenu packages I have created for an idea on how to create those.

  • Replies 435
  • Views 171.1k
  • Created
  • Last Reply

Thanks for the warning prostuff1

 

I'm not even sure glibc-solibs-2.13-i486-4.txz is required, it was just listed as a dependant so I loaded it.  I am using your SAB & SB packages in unmenu (they are fantastic by the way).  So far they are both working okay following numerous reboots during PS3MS testing, but I might try removing glibc-solibs-2.13-i486-4.txz to see if it causes any issues.  Is there any way to test if xargs is working?

 

Regarding the scripts all I really want to do is to stop PMS.sh located on my apps drive, so that I can change settings, and then start it again without having to stop SAB, SB, the array and reboot.  I'm not sure how to stop a program running like that.  I've created 2 buttons but I just need to know how to actually stop the media server so I can incorporate that into the script.

 

Is it hard to make a unmenu package for PS3MS?  If I got the stop/start buttons sorted I was considering giving it ago and learning along the way. :)

Thanks for this Lacehim!!

 

I was having a similar problem with mp4 files that I converted using handbrake.  Previously, the mp4 files would always give a data corrupted error, but after installing mediainfo as per your post above these files are now playing with conversion. 

 

I still can't get it to play mp4s without conversion (I still get the same data corrupted error), so if you have any other suggestions that would be appreciated.

 

Re creating a start/stop script for PMS - I followed prostuff1's suggestion and looked at the other unMenu packages on how they were setup.

I ended up using the Airvideo start/stop scripts as an example and have created similar ones for PMS.

 

Here's what I did:

Start Script

Created a file called 43-unmenu_user_script_start_ps3ms in the unmenu folder

Put the following code in this file:

 

#UNMENU_RELEASE $Revision: 75 $ $Date: 2011-10-12 20:00:00 -0400 (Wed, 12 Oct 2011) $
#define USER_SCRIPT_LABEL Start PS3 Media Server
#define USER_SCRIPT_DESCR This will start the PS3 Media Server service so you can stream and live convert files to your PS3
#define USER_SCRIPT_TEST test -e /var/custom/ps3ms/pms.jar && echo "Start PS3 MS"
echo "<pre>"
set -xv
cd /var/custom/ps3ms
echo "PMS.sh &" | at now + 1 minute

 

Stop Script

Created a file called 43-unmenu_user_script_stop_ps3ms in the unmenu folder

Put the following code in this file:

 

#UNMENU_RELEASE $Revision: 75 $ $Date: 2011-10-12 20:00:00 -0400 (Wed, 12 Oct 2011) $
#define USER_SCRIPT_LABEL Stop PS3MediaServer
#define USER_SCRIPT_DESCR This will stop the PS3 MediaServer service from running so that the array can be stopped cleanly
#define USER_SCRIPT_TEST test -x /var/custom/ps3ms/pms.jar && echo "Stop PS3 MS"
echo "<pre>"
set -xv
if [[ ! -z $(ps -ef | grep pms.jar | grep -v grep | awk '{print$2}') ]]; then
sleep 5
   for i in $(ps -ef | grep pms.jar | grep -v grep | awk '{print$2}')
   do
      if [[ $(ps -fp $i | awk 'NR>1' | awk '{print $13}') = /var/custom/ps3ms/pms.jar ]]; then
         kill $i
         echo "<font color="red"><b>Killed "$i"</b></font>"
      fi
      sleep 5
   done
fi

 

Note: Be sure to replace /var/custom/ps3ms with your PMS dir

 

Restart and the new buttons to start and stop PMS should be there.

Thanks Hitechuno,

 

The scripts look very similar to what I was working on.  I will try yours and see how I go.  I'm running my PS3MS off my apps drive at /mnt/disk/apps/ps3ms/pms.jar will that still work?  I was trying to save my flash drive getting used, and don't have a cache drive at the moment.

 

Are you streaming to a PS3?  I found that scene mp4s played straight away, but handbrake uses m4v as it's extension.  As I mentioned above, m4vs still converted, so I modified my PS3.conf in the renderers folder, scroll down until you find StreamExtensions and put m4v into it so it look slike this StreamExtensions = m4v (notice no .) this forces it to stream and it's working perfectly.  You could also put that in PMS.conf if you only stream to a PS3, but I stream to different devices (iphone, ipad, WDTV) and have them set up using individual .conf settings under renderers.

  • 3 weeks later...
  • 2 weeks later...

Good afternoon everyone...

 

I was looking at my DLNA options for unraid and found this thread.  I do NOT have a PS3, but I do have a blue ray player that supports DLNA.  Does this PS3Mediaserver plugin require a PS3?  or does it just offer support for DLNA as a whole?

 

thanks

It works with everything that I've used with Dlna.  Ps3, wdtv, samsungtv, xbmc, and goodplayer on iOS devices. :)

Re creating a start/stop script for PMS - I followed prostuff1's suggestion and looked at the other unMenu packages on how they were setup.

I ended up using the Airvideo start/stop scripts as an example and have created similar ones for PMS.

 

I'm running ps3ms off my cache drive. I've installed the scripts and while the stop script does shut down ps3ms, I can't seem to get the start script to work. I've attached the start script as a text file.  Any suggestions? I'm running 4.7.

 

BTW, I get the following error message after attempting to start ps3ms

 

"May 22 07:04:00 Tower kernel: atd[29301]: segfault at 0 ip (null) sp bfe1b238 error 14 in atd[8048000+4000]"

43-unmenu_user_script_start_ps3ms.txt

Woodpusherghd, I had the same issue just didn't get time to post up with the messages.  Here's what mine says when I shutdown and start up.

 

When I run the shutdown script this appears at the bottom and it works okay.  I'm not sure if it's supposed to print all this but PS3MS can't be seen via any DLNA player.

 

if [[ ! -z $(ps -ef | grep pms.jar | grep -v grep | awk '{print$2}') ]]; then

sleep 5

  for i in $(ps -ef | grep pms.jar | grep -v grep | awk '{print$2}')

  do

      if [[ $(ps -fp $i | awk 'NR>1' | awk '{print $13}') = /mnt/disk/apps/ps3ms/pms.jar ]]; then

        kill $i

        echo "Killed "$i""

      fi

      sleep 5

  done

fi

ps -ef | grep pms.jar | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep pms.jar

++++ grep -v grep

+++ [[ ! -z 19900 ]]

+++ sleep 5

ps -ef | grep pms.jar | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep pms.jar

++++ grep -v grep

+++ for i in '$(ps -ef | grep pms.jar | grep -v grep | awk '\''{print$2}'\'')'

ps -fp $i | awk 'NR>1' | awk '{print $13}'

++++ ps -fp 19900

++++ awk '{print $13}'

++++ awk 'NR>1'

+++ [[ /mnt/disk/apps/ps3ms/pms.jar = /mnt/disk/apps/ps3ms/pms.jar ]]

+++ kill 19900

+++ echo 'Killed 19900'

Killed 19900

+++ sleep 5

 

When I press the start button the message at the bottom is as follows

 

cd /mnt/disk/apps/ps3ms

+++ cd /mnt/disk/apps/ps3ms

echo "PMS.sh &" | at now + 1 minute

+++ echo 'PMS.sh &'

+++ at now + 1 minute

warning: commands will be executed using /bin/sh

job 1 at Tue May 22 22:10:00 2012

 

Would be a nice have just to be able to restart PS3MS after making changes to settings in the renders or PS3.conf, but apart from that PS3MS has been very good now that I have it set up the way I want it with all my different devices. :)

Woodpusherghd, I had the same issue just didn't get time to post up with the messages.  Here's what mine says when I shutdown and start up.

 

When I press the start button the message at the bottom is as follows

 

cd /mnt/disk/apps/ps3ms

+++ cd /mnt/disk/apps/ps3ms

echo "PMS.sh &" | at now + 1 minute

+++ echo 'PMS.sh &'

+++ at now + 1 minute

warning: commands will be executed using /bin/sh

job 1 at Tue May 22 22:10:00 2012

 

 

I get the same message. 

Woodpusherghd,

In the shutdown script change "set -xv" to "#set -xv" and it doesn't out put all the code, it just says "killed" then a number :)

 

Still working on the start script if anyone has any input to help.

Woohoo.  Shutdown and Startup scripts are now working on my server. :)  Happy days!

 

Start up Script is as follows

 

#define USER_SCRIPT_LABEL Start PS3 Media Server
#define USER_SCRIPT_DESCR This will start the PS3 Media Server service so you can stream and live convert files to your PS3
#define USER_SCRIPT_TEST test -e /mnt/disk/apps/ps3ms/pms.jar && echo "Start PS3 MS"
echo "<pre>"
set -xv
cd /mnt/disk/apps/ps3ms
./PMS.sh
echo "PMS.sh &" | at now + 1 minute

 

I took a look at my go script which automatically started PS3MS, and used the ./PMS.sh command in that and it works fine.  It throws out a lot of startup info, so I might set #set -xv and see what happens.

 

The first time I ran it unmenu stopped responding, and wouldn't reopen.  The PS3MS was running though, so I manually restarted unmenu, and stopped and started PS3MS and it didn't happen again.  Let me know if it works on your machine Woodpusherghd.

When I start PS3 MS with the script, it kills unmenu. Strange.

That's happened to me a few times, but it does restart ps3ms.  Not sure what's happening with unmenu.

 

  • 2 weeks later...

Woohoo.  Shutdown and Startup scripts are now working on my server. :)  Happy days!

 

Start up Script is as follows

 

#define USER_SCRIPT_LABEL Start PS3 Media Server
#define USER_SCRIPT_DESCR This will start the PS3 Media Server service so you can stream and live convert files to your PS3
#define USER_SCRIPT_TEST test -e /mnt/disk/apps/ps3ms/pms.jar && echo "Start PS3 MS"
echo "<pre>"
set -xv
cd /mnt/disk/apps/ps3ms
./PMS.sh
echo "PMS.sh &" | at now + 1 minute

 

I took a look at my go script which automatically started PS3MS, and used the ./PMS.sh command in that and it works fine.  It throws out a lot of startup info, so I might set #set -xv and see what happens.

 

The first time I ran it unmenu stopped responding, and wouldn't reopen.  The PS3MS was running though, so I manually restarted unmenu, and stopped and started PS3MS and it didn't happen again.  Let me know if it works on your machine Woodpusherghd.

I'm not sure what you are trying to do, but unMENU user-scripts will wait for ALL output from commands before returning.  unMENU is not crashing, it is instead patiently waiting for your invoked process to finish so it can then send the output to the browser.  To have unMENU return, you must just send the output elsewhere while the program runs.

 

If invoking PMS.sh via "at" there is no need to put it in the background.  (in effect, it will be, as it will be invoked by "at")

If invoking it via "at" there is no need to invoke it directly as well on the prior line.  (you are then attempting to start it twice... and that cannot be a good thing)

 

The script then should be:

#define USER_SCRIPT_LABEL Start PS3 Media Server

#define USER_SCRIPT_DESCR This will start the PS3 Media Server service so you can stream and live convert files to your PS3

#define USER_SCRIPT_TEST test -e /mnt/disk/apps/ps3ms/pms.jar && echo "Start PS3 MS"

echo "<pre>"

set -xv

cd /mnt/disk/apps/ps3ms

echo "sh ./PMS.sh >/var/log/pms3.log 2>&1" | at now + 1 minute

 

I've directed the output to a log file in /var/log.  If no log file is needed, you can change the line to send all output to /dev/null.

echo "sh ./PMS.sh >/dev/null 2>&1" | at now + 1 minute

 

Have fun.

 

Joe L.

 

Thanks Joe L. for the help.  I'm new to linux and unraid so I'm really not sure what I'm doing  ;)

 

The script you provided isn't starting PS3MS, and I think possibly the only thing that was starting it was ./PMS.sh and the line below that wasn't actually working at all.

 

The output I get with I run the script you provided is

 

cd /mnt/disk/apps/ps3ms

+++ cd /mnt/disk/apps/ps3ms

echo "sh ./PMS.sh >/var/log/pms3.log 2>&1" | at now + 1 minute

+++ echo 'sh ./PMS.sh >/var/log/pms3.log 2>&1'

+++ at now + 1 minute

warning: commands will be executed using /bin/sh

job 6 at Sat Jun 16 14:55:00 2012

 

The media server doesn't start at all.  Any ideas what I'm doing wrong?

Thanks Joe L. for the help.  I'm new to linux and unraid so I'm really not sure what I'm doing  ;)

 

The script you provided isn't starting PS3MS, and I think possibly the only thing that was starting it was ./PMS.sh and the line below that wasn't actually working at all.

 

The output I get with I run the script you provided is

 

cd /mnt/disk/apps/ps3ms

+++ cd /mnt/disk/apps/ps3ms

echo "sh ./PMS.sh >/var/log/pms3.log 2>&1" | at now + 1 minute

+++ echo 'sh ./PMS.sh >/var/log/pms3.log 2>&1'

+++ at now + 1 minute

warning: commands will be executed using /bin/sh

job 6 at Sat Jun 16 14:55:00 2012

 

The media server doesn't start at all.  Any ideas what I'm doing wrong?

perhaps you are not waiting 1 minute?

 

Does the script PMS.sh exist at /mnt/disk/apps/ps3ms/PMS.sh ??

 

After 1 minute...

What is in the log file it creates (the one you redirected output to in /var/log/pms3.log ?)

 

Joe L.

perhaps you are not waiting 1 minute?

I went and made a cup of tea just to make sure I wasn't being impatient. :)  PS3MS isn't running (tried by searching for a DLNA server), apart from the output script I posted earlier, that's all that appears to happen.

 

Does the script PMS.sh exist at /mnt/disk/apps/ps3ms/PMS.sh ??

Yes, my go script runs PS3MS on boot using the following.

 

# Start PS3MS

cd /mnt/disk/apps/ps3ms

installpkg jre-6u11-i586-1.tgz

cd /mnt/disk/apps/ps3ms/mencoder

installpkg *.tgz

cd /mnt/disk/apps/ps3ms/mencoder

installpkg *.txz

cd /mnt/disk/apps/ps3ms

./PMS.sh

 

I can also manually go to cd /mnt/disk/apps/ps3ms in telnet, then run PMS.sh and it runs the server.  Telnet doesn't return to a prompt after finishing loading PS3MS, and it terminates when I close the window.

 

After 1 minute...

What is in the log file it creates (the one you redirected output to in /var/log/pms3.log ?)

Nothing is created in var/log called pms3.log, so I can only assume that the script doesn't execute or create a log file. :(

 

As I said, totally new to linux which doesn't help BUT I am willing to learn.

  • 4 weeks later...

Bump.  I would really love some help on a start up script.  Anyone?

 

I have code that works at boot in the go file, but for some reason I can't get the script to run it again and it's frustrating having to reboot the server just to reboot PS3MS.

I've made a bit of progress.

 

If I log into telnet, and run

 

cd /mnt/disk/apps/ps3ms

sh ./PMS.sh >/var/log/pms3.log 2>&1

 

The server runs and I get a log file, but telnet doesn't return, and the program terminates when I close telnet.  Also if I use the echo command the server doesn't run. :(

 

So how do I get unMENU or telnet to return.  JoeL said I "must just send the output elsewhere while the program runs."

  • 3 weeks later...

Still Zero help with a start up script :(

 

Anyway if anyone is still using PS3MS on a headless system, I just came across a great post http://www.ps3mediaserver.org/forum/viewtopic.php?f=2&t=14119

 

Hagar (on PS3MS forums) has made a sample PMS.conf file containing most of the key/value pair labels for use on headless systems without a GUI, including comments for each function.  After downloading it and taking it a peak, WOW, is the word.  Fantastic documentation, I hope they put this into their releases in future. 

  • 1 month later...

Today I thought I would try to upgrade to PS3MS 1.7 to see if it solves an annoying issue with some folders not being updated as media is added.  Only happens to some folders for some reason.  I could restart just PS3MS, but I can't get a working startup script and rebooting just to get it to update is really annoying.

 

Everything seems to have went okay but for some reason it won't start on boot. :(

 

My go script hasn't been changed.

 

# Start PS3MS

cd /mnt/disk/apps/ps3ms

installpkg jre-6u11-i586-1.tgz

cd /mnt/disk/apps/ps3ms/mencoder

installpkg *.tgz

cd /mnt/disk/apps/ps3ms/mencoder

installpkg *.txz

cd /mnt/disk/apps/ps3ms

./PMS.sh

 

Jre, FFMPEG, mencoder all installs and is running, but it appears that ./PMS.sh doesn't get started anymore.  I logged into the server via telnet and I can manually start the server using cd /mnt/disk/apps/ps3ms and then ./PMS.sh and it runs and streams media perfectly.  Anyone have any ideas why this doesn't run from the go script?  I can't manually start it because A) I don't have a start up script and B) When you close telnet it terminates the PS3MS.

 

I also found a couple of options via Tower:5001/console/home only 2 options, scan media (which starts but crashed PS3MS) and shrink database which is not recommended.  I thought I would mention it.

 

Any help would be appreciated. :)  Cheers.

  • 2 weeks later...

I suppose that must be good news, for me, it wasn't. SRT don't show up any more after the upgrade. PS3 Media Server sees them, Transcode folder also sees them but they won't show during the playback, untranscoded or transcoded. Why? Downgrading to 1.54

 

  • 3 weeks later...

I'm not sure what you are trying to do, but unMENU user-scripts will wait for ALL output from commands before returning.  unMENU is not crashing, it is instead patiently waiting for your invoked process to finish so it can then send the output to the browser.  To have unMENU return, you must just send the output elsewhere while the program runs.

 

If invoking PMS.sh via "at" there is no need to put it in the background.  (in effect, it will be, as it will be invoked by "at")

If invoking it via "at" there is no need to invoke it directly as well on the prior line.  (you are then attempting to start it twice... and that cannot be a good thing)

 

The script then should be:

#define USER_SCRIPT_LABEL Start PS3 Media Server

#define USER_SCRIPT_DESCR This will start the PS3 Media Server service so you can stream and live convert files to your PS3

#define USER_SCRIPT_TEST test -e /mnt/disk/apps/ps3ms/pms.jar && echo "Start PS3 MS"

echo "<pre>"

set -xv

cd /mnt/disk/apps/ps3ms

echo "sh ./PMS.sh >/var/log/pms3.log 2>&1" | at now + 1 minute

 

I've directed the output to a log file in /var/log.  If no log file is needed, you can change the line to send all output to /dev/null.

echo "sh ./PMS.sh >/dev/null 2>&1" | at now + 1 minute

 

Have fun.

 

Joe L.

 

JoeL, can you please help me a bit more with this?  Currently I'm using ./PMS.sh but once that process is run it takes ages to return.  I noticed that on my go script  (as you mentioned above where unmenu was waiting for a reply before moving on).  I've tried your

echo "sh ./PMS.sh >/dev/null 2>&1" | at now + 1 minute

method and PMS.sh doesn't run at all.  HELP!

 

I've recently updated my go script with echo "Run Application Name here" | logger script.  It was interesting because it printed progress to syslog as it progressed though the go file, BUT when it got to PMS.sh, it seemed to stop.  Checking the syslog it was 20 minutes later that it moved on to the next portion of the go file!  15 minutes!  That's one slow start, and what is strange is that DLNA server was useable during the 15 minutes.  Strange.

 

Oct 10 12:52:04 Tower unmenu-status: Starting unmenu web-server

Oct 10 12:52:04 Tower logger: Run Unmenu

Oct 10 12:52:10 Tower logger: Installing JRE

Oct 10 12:52:22 Tower logger: Installing TGZ Packages

Oct 10 12:52:32 Tower logger: Installing TXZ Packages

Oct 10 12:55:34 Tower ntpd[1797]: synchronized to 192.231.203.132, stratum 2

Oct 10 14:10:05 Tower logger: Run PMS.sh

 

Thanks in advance for any help with this.  I have considering upgrading to v5, but don't use a cache so that's me stuffed plugins wise. :(

After an afternoon playing about I found a way to start PMS.sh without all the waiting for it to finish and move onto the next command in the go script.

 

I couldn't get the echo command to work (i.e. echo "sh ./PMS.sh >/var/log/pms3.log 2>&1" | at now + 1 minute) even after manually playing with it in telnet to see if I could get it working.

 

So after a bit of googling I came across someone who used the following

 

nohup ./PMS.sh &

 

I put that in my go script and PMS.sh has started, and it then moved on straight away by logging in syslog with echo "Run PMS.sh" | logger script.  Before it would be 20mins or so before this would appear.

 

So, is there anything wrong with using nohup?  I'm new to linux, and I do realise that not everything you come across on google is the right way!  ;D

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.