For anyone wanting to know if their NAS is powerful enough to transcode: https://docs.google.com/spreadsheet/ccc?key=0AhqU12yGv_OxdC1VYjYtMmRiSlVReVZhNVBLZ0JxSmc
More details about NAS’s on the main Plex wiki: http://wiki.plexapp.com/index.php/FAQ:_Plex_Media_Server_and_NAS
Dropping by to add a couple of cents.
I copied the zip and copied to my Synology 212 and unzipped it. I then edited Settings.cfg (or Settings.py if it has not been generate) according to the following (replace the two with the IP-address of your synology unit):
g_settings = { \ 'enable_plexgdm' 'False'), \
'ip_pms' ''), \
'port_pms' '32400',), \
\
'enable_dnsserver''True', 'False'), \
'ip_dnsmaster' ''), \
}
Then I issued the following commands in the Terminal (I'm on a Mac, so in Windows this would be the command prompt I guess; Run->cmd)
ssh root@ cd .. cd /dev/ mkdir /shm/ cd .. cd ./PlexConnect.py
The first command will open a connection to your Synology-device, the second will place you somewhere meaningful in the directory. If you used the web interface to upload the zip-file, you will most likely want to start with /volume1/ for the second cd-command.
The middle part will create a directory in /dev/ called shm. I don't know if it is necessary, but I did it anyway, so I thought I might include it.
The last command will run the Python-script. I got the feeling this worked better than python PlexConnect.py, but I don't see why it should.
Beware of some timeouts though and remember to actually add something to your Plex server!
This got me the following conclusions:
- It is possible to stream mp4's.
- No other format is likely to play since most Synology-devices do not support transcoding.
The last conclusion comes from this (one of f00b4r's links):
Be an ARM supported model (currently only the ReadyNAS and Synology ARM models). Note that ARM models do not support transcoding at all, and likely never will. The format of your media will need to 100% match the formats your clients can play in order to work with an ARM-based NAS. Without the transcoder you are also likely to run into issues when viewing your media remotely as you will only be able to stream the media at full bit-rate, needing an internet connection with a high bandwidth
Great effort on the PlexConnect (Really! This is incredibly cleaver!), but I guess you need something else than a standard Synology NAS to use it.
Edit: Clarified some things with the Settings-files and added creation of shm-folder.
Just to be aware you should really now be editing settings.cfg and not settings.py if using any source code from the last week (settings.cfg will get auto generated on the first run so just start and stop PlexConnect - it is a lot clearer to edit as well).
If you have e.g. a low powered ARM CPU in your NAS take a look at iFlicks (or other similar apps), you could transcode and fully tag your media to an Apple supported format very quickly (you do not need to re-encode); this is also helpful for playing on your iPhone etc…
Still not working on my Synology DS713+
Python 2.7.5-6
DSM 4.2-3202
PlexConnect pulled from Git on June 11.
I changed the httpd listen port. Confirmed no services are listening on port 80.
DiskStation> lsof -i -P |grep :80 DiskStation>
I added "none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0" to /etc/fstab, and mounted /dev/shm
DiskStation> mount | grep /dev/shm none on /dev/shm type tmpfs (rw,nosuid,nodev,noexec) DiskStation>
I'm still having issues with the multiprocessing.
DiskStation> ./PlexConnect.py
PlexConnect : ***
PlexConnect : PlexConnect
PlexConnect : Press ENTER to shut down.
PlexConnect : ***
Traceback (most recent call last):
File "./PlexConnect.py", line 39, in
cmd_DNSServer = Queue()
File "/volume1/@appstore/python/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue
return Queue(maxsize)
File "/volume1/@appstore/python/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
self._rlock = Lock()
File "/volume1/@appstore/python/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/volume1/@appstore/python/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 38] Function not implemented
I also tried the official Synology Python package (Python 2.7.3-011) but get the exact same result.
I imagine that the reason why it works on some Synology and not others is because of different processors having a different implementation of multithreading support. My DS713+ has an ATOM D2700. The DS212j has an ARM Marvell Kirkwood mv6281. While I can find my way around a terminal, I don't have nearly enough skill to troubleshoot this type of issue, and I seem to have run into a dead end with Google.
Just to be aware you should really now be editing settings.cfg and not settings.py if using any source code from the last week (settings.cfg will get auto generated on the first run so just start and stop PlexConnect - it is a lot clearer to edit as well).
If you have e.g. a low powered ARM CPU in your NAS take a look at iFlicks (or other similar apps), you could transcode and fully tag your media to an Apple supported format very quickly (you do not need to re-encode); this is also helpful for playing on your iPhone etc..
True, but since the instructions hadn't run the script it had not been generate yet. Anyway, clarified the instructions, thanks. :)
I'll take a look at iFlicks, thanks for the tip!
I can finally say it works for me .I have Synology 213 with DSM 4.21.- I installed the "Python" of synology packages.2.- I installed the "Python" of synology community too.3.- I created the directory PlexConnect in "/volume1/".4.- I unzipped the zip "PlexConnect-XML_templates.zip" in "PlexConnect"5.- I edited /usr/syno/apache/conf/httpd.conf-user and changed the number of Listen 80 to Listen 816.- I edited /usr/syno/etc/rc.d/S97apache-user.sh and chnged "if [ "$HttpPort" != "80" ]; then" by "if [ "$HttpPort" != "81" ]; then"7.- ran the PlexConnect.py with the command. / PlexConnect in the directory "PlexConnect". The result was ok.8.- I did the startup script with the command "vi / usr/syno/etc/rc.d/S99plexconnect.sh" and put#! /bin/shLOGFILE="/volume1/PlexConnect/plex.log"PLEXCONNECT="/volume1/PlexConnect/PlexConnect.py"case "$1" instart)echo "Starting PlexConnect..."nohup python $PLEXCONNECT 2>&1 > $LOGFILE &;;stop)echo "Stopping PlexConnect..."killall python;;*)echo "Usage: plexconnect {start|stop}"exit 1;;esacexit 09.- i changed thea attributes of the file created with this command : chmod +x /usr/syno/etc/rc.d/S99plexconnect.sh10. reboot the synologyI hope you workoppps i forget it . Of course i changed the dns ip of appletv to the synology ip.
Till step 7 I got it, but then...
I don't know anything about python and linux. :)
Can you help?
Till step 7 I got it, but then...
I don't know anything about python and linux. :)
Can you help?
In the step 7 just enter to directory "cd /volume1/PlexConnect/" press enter and put "./PlexConnect.py" then you can show the result. if everything was correct you can show
In the step 7 just enter to directory "cd /volume1/PlexConnect/" press enter and put "./PlexConnect.py" then you can show the result. if everything was correct you can show
PlexConnect : ***PlexConnect : PlexConnectPlexConnect : Press ENTER to shut down.PlexConnect : ***PlexConnect : IP_self: 192.168.1.55PlexGDM : ***PlexGDM : looking up Plex Media ServerPlexGDM : ***PlexGDM : servers discovered: 1PlexConnect : PMS: 192.168.1.55:32400(the numbers are my ip plexserver in your case can be others) then you press enter and the program exit.
I get this:
I get this:
DiskStation> python PlexConnect.pyPlexConnect : ***PlexConnect : PlexConnectPlexConnect : Press ENTER to shut down.PlexConnect : ***Traceback (most recent call last):File "PlexConnect.py", line 36, incmd_DNSServer = Queue()File "/usr/local/lib/python2.7/multiprocessing/__init__.py", line 218, in Queuereturn Queue(maxsize)File "/usr/local/lib/python2.7/multiprocessing/queues.py", line 63, in __init__self._rlock = Lock()File "/usr/local/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__SemLock.__init__(self, SEMAPHORE, 1, 1)File "/usr/local/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)OSError: [Errno 38] Function not implemented
what synology do you have? that error was reported with certain models with atom processor.
what synology do you have? that error was reported with certain models with atom processor.
Yeah I have an old one from last year. DS1812+ :(
Is there no solution?
Yeah I have an old one from last year. DS1812+ :(
Is there no solution?
sorry do not know. I would try adding "none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0" to "/etc/fstab" and rebooting. good luck
sorry do not know. I would try adding "none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0" to "/etc/fstab" and rebooting. good luck
Tried it, but doesn't solve the problem.
Yeah I have an old one from last year. DS1812+ :(
Is there no solution?
Hm...
You might want to try to replace the multiprocessing package with multithreading.
For a start - and further investiagtion:
in PlexConnect.py change "from multiprocessing import Process, Queue" to "from multithreading import Process, Queue". This *might* be all, those packages should behave very similar. Test... and check the official python docs!
Hm...
You might want to try to replace the multiprocessing package with multithreading.
For a start - and further investiagtion:
in PlexConnect.py change "from multiprocessing import Process, Queue" to "from multithreading import Process, Queue". This *might* be all, those packages should behave very similar. Test... and check the official python docs!
Output:
I also tried the official Synology Python package (Python 2.7.3-011) but get the exact same result.
I imagine that the reason why it works on some Synology and not others is because of different processors having a different implementation of multithreading support. My DS713+ has an ATOM D2700. The DS212j has an ARM Marvell Kirkwood mv6281. While I can find my way around a terminal, I don't have nearly enough skill to troubleshoot this type of issue, and I seem to have run into a dead end with Google.
I agee it has to do something with processor architecture. I hope somebody has the solution for Intel ATOM based Synologies soon.
When I add none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0 to /etc/fstab and start PlexConnect.py it doesn't work. If I reboot the Synology the line none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0 is gone. I get:
PlexConnect : ***
When I change from multiprocessing import Process, Queue to from multithreading import Process, Queue I get:
Traceback (most recent call last):
This post describes how to setup your synology with PlexConnect. It also explains how to run PlexConnect every time your synology reboots.
I can finally say it works for me .I have Synology 213 with DSM 4.21.- I installed the "Python" of synology packages.2.- I installed the "Python" of synology community too.3.- I created the directory PlexConnect in "/volume1/".4.- I unzipped the zip "PlexConnect-XML_templates.zip" in "PlexConnect"5.- I edited /usr/syno/apache/conf/httpd.conf-user and changed the number of Listen 80 to Listen 816.- I edited /usr/syno/etc/rc.d/S97apache-user.sh and chnged "if [ "$HttpPort" != "80" ]; then" by "if [ "$HttpPort" != "81" ]; then"7.- ran the PlexConnect.py with the command. / PlexConnect in the directory "PlexConnect". The result was ok.8.- I did the startup script with the command "vi / usr/syno/etc/rc.d/S99plexconnect.sh" and put#! /bin/shLOGFILE="/volume1/PlexConnect/plex.log"PLEXCONNECT="/volume1/PlexConnect/PlexConnect.py"case "$1" instart)echo "Starting PlexConnect..."nohup python $PLEXCONNECT 2>&1 > $LOGFILE &;;stop)echo "Stopping PlexConnect..."killall python;;*)echo "Usage: plexconnect {start|stop}"exit 1;;esacexit 09.- i changed thea attributes of the file created with this command : chmod +x /usr/syno/etc/rc.d/S99plexconnect.sh10. reboot the synologyI hope you workoppps i forget it . Of course i changed the dns ip of appletv to the synology ip.
Thanks for everyones suggestions. Looks like more of us are getting this to work!
Not me unfortunately.
I have followed this including changing the listen port to 81 but I get the following:
Any suggestions gratefully received!
Thanks for everyones suggestions. Looks like more of us are getting this to work!
Not me unfortunately.
I have followed this including changing the listen port to 81 but I get the following:
PlexConnect : ***PlexConnect : PlexConnectPlexConnect : Press ENTER to shut down.PlexConnect : ***PlexConnect : IP_self: 192.168.1.85PlexGDM : ***PlexGDM : looking up Plex Media ServerPlexGDM : ***PlexGDM : No servers discoveredWebServer : Failed to connect to port 80 (http): [Errno 98] Address already in useDNSServer : ***DNSServer : Starting up.DNSServer : intercept trailers.apple.com: 192.168.1.85DNSServer : forward other to higher level DNS: 8.8.8.8DNSServer : ***DNSServer : Shutting down.PlexConnect : WebServer not alive. Shutting down.I do have multiple version of Python Installed so not sure if that's causing the problem.I have synocommunity 2.7.5-6 (used by Couchpotato server, sickbeard etc.) andthe synology 2.7.3-011Any suggestions gratefully received!
actually maybe I'm wasting my time.... Taking a look at this link it doesn't look like my NAS is supported anyway:
https://docs.google.com/spreadsheet/ccc?key=0AhqU12yGv_OxdC1VYjYtMmRiSlVReVZhNVBLZ0JxSmc#gid=0