Serviio DLNA Server on Synology NAS

Questions about using 3rd party Media Streaming software may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

Serviio DLNA Server on Synology NAS

Postby beckos » Sat Feb 19, 2011 10:26 am

After a long process I was able to start Serviio 0.5 DLNA server on my DS211+ DSM 3.0-1380. I was following the tutorial written by Patters. Every step there is well described and things were going as they were supposed to... almost. I did make some mistakes by myself (like downloading a wrong version of Java, which I had to delete and reinstall the correct one for my CPU; I deleted the java instalation folder and reinstalled the correct java version ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010). I would have liked to see some details in regards to what rights should be given to user Serviio (maybe see an example).

I keep media files in the system default folders video, music and photo, because I want them to be streamed within the network by Synology Media Server - which is very fast and streams FLAC files very well to my AV Receiver.


Now the Serviio server starts automatically each time the NAS starts and it is seen on Playstation 3 and within the network, but I still have these problems:

1. I was not able to add content folders in the Serviio Console-0.5 Library. Every time I try to add a folder through the Ajax browser I get the following error:

Error encountered:
ERRNO: 2
TEXT: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes)
LOCATION: /volume1/web/serviio/afb/browse.class.php, line 68


I used the Add Path scripted button instead and I added the following media folder paths: /volume1/video, /volume1/music, volume1/photo. No content is shown in PS3, just the navigation folders. I can see the video, music and photo folders in PS3 but no content there.

2. In the Status Page, PS3 IP address is correctly identified by the server and the DLNA device selector automatically selects PS3 as device, BUT the status icon is always yellow (status unknown), instead of green (as it is for other device IP when I start Windows Media Player on a computer in the network - but no content here, as well).

3. In the Library page, if I check the checkbox for Keep library automatically updated, the CPU on the NAS raises at 100% instantly. The process taking so much is ffmpeg. Once started there seem to be no way of stop it. Actually, I don't even know what the process is doing, since nothing is playing.

4. Java is taking around 65Mb of NAS's memory regardless the Serviio server status. That is 20% of the available memory. It is ok?

5. I have disabled transcoding because I was not able to select the /volume1@tmp folder through the Ajax browser. However, I manually put the path in the field and Saved the Transcoding settings. I don't know if that's suffice.

6. The Server Console user interface pages have a black background and is very hard to read the text in the page. Is this happening to other users as well? Because I can see in the interface example pages that they should be on white. I put some screen captured images with my screens in this forum post.


In conclusion, the Serviio server is running on my DiskStation but it seems that is wrongly configured to stream files. Any help would be greatly appreciated.

Thank you!
Last edited by beckos on Thu Feb 24, 2011 9:54 am, edited 1 time in total.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby patters » Tue Feb 22, 2011 1:27 am

Hi there,

1. What you describe is normal - the web service user which runs that Web UI PHP doesn't have access to the filesystem root, which is what it's complaining about. I don't really think it should either. Add Path is the button to use, as you stated. However, I'll bet your issue is that the serviio user (that you created to run the serviio process) does not have read permissions on those folders. Use the User Control Panel in DSM to rectify this.

2. Depending on how they announce themselves on the LAN, some devices always stay orange (Sony Bluray players for instance), so this isn't necessarily a problem. Try running Serviio on your PC or Mac first and compare.

3. This is in my experience caused by Serviio using FFmpeg to create thumbnails for each media file, and it seems to hang on certain files. The issue has been reported in this Serviio forum thread. I get around this by deselecting Generate thumbnails for local videos in the metadata tab of the Web UI. Note that you have to click Save on each tab or it will not take effect. As you'll see if you have a renderer that supports thumbnails, Serviio retrieves good thumbnails from the online DBs. Thanks for raising this, I'll amend the guide with a mention of the issue.

4. Yep, it does this for me too - though I have a DS111 with 256MB. According to ps it looks like it's using 512MB, including virtual memory.

5. I would leave transcoding enabled. Manually defining /volume1/@tmp does work, and though the ARM CPU can't manage video transcoding, it certainly seems to do audio fine - which will be important once version 0.6 comes along and allows audio transcoding for flac, m4a etc.

6. That seems to be Internet Explorer being rather non-standards compliant. Seems fine on just about any other web browser. Guide amended again!
For my packages (Java, Serviio, CrashPlan, CrashPlan PRO, CrashPlan PROe, Minecraft, Craftbukkit, OpenRemote, and Bliss), add my repo URL to Package Center: http://packages.pcloadletter.co.uk
patters
Experienced
Experienced
 
Posts: 113
Joined: Mon Feb 07, 2011 3:41 am

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby beckos » Tue Feb 22, 2011 10:43 am

Hi Patter. Thanks for your input.

1. Before, I was giving Serviio user read rights only on DSM's default media folders (video, audio, photo), where I keep the files. Maybe because they are all on /volume1 and because there are other shared folders as well, the ajax browser could not access some of them and returned that error. Before, I solved that by modifying the config.php file from /web/serviio/afb/ folder to: $path = '/volume1'; , but the ajax file browser only skipped the error, it didn't show any other buttons for navigation or selecting folders; it just showed a blank screen with the text in bold /volume1. See image bellow. I also had to Customize PHP_opendir in PHP Settings under Control Pannel Web Station to add /volume1: to the default paths. So, for me, the ajax browser only shows this:

Image

Now I was giving read rights to all folders in the /volume1 for Serviio user. He also belongs to Users group which have write rights on all folders. Before doing so, I was not able to see any content folders in PS3. Now, all video content is there; audio and video only shows some of the content folders and files, but that's maybe due to the time needed for Serviio to index all the media files. One hour later, for audio content (mostly FLAC, some MP3) some MP3 are shown, but no FLAC whatsoever; only some photo folders are listed in PS3 and the photos can be viewed. The rest majority of audio and photo content is still not indexed and I have a feeling they won't be... something might still be wrong in terms of user rights.

2. Seem solved with orange icon.

3. I've unchecked Generate thumbnails for local videos. No thumbnails now in PS3. No thumbnails from online DBs. The Retrieve DVD cover image or poster if available checkbox behaves strangely: Saving the configuration results in the setting to become unchecked; then, if the configuration is saved again, the checkbox comes up checked again, by itself. I suppose the interface is not bug free... So far, no thumbnails for video. (Late note: Now, the thumbnails are retrieved from internet DB's! I have saved the page twice and the mentioned checkbox came up checked. This time it worked, and the thumbnails are generated from the posters available in these online databases. I still think Servio deserves a better User Interface, with better control over critical background processes.)

4 & 5. Here is a screen capture of the resource monitor during playback of a 1080p movie. I noticed that ffmpeg keeps processor at 100% even when the movie playback stops. It would have been nice to have a feedback interface to see what Serviio is actually doing in background. I suppose the transcoding keep on running even if the playback has stopped. I wonder what is going on if I stop playing a movie and then I start playing another one? Both files are transcoding in background?!? I don't know how to check that... the memory monitor shows around 60% now, with java eating 240Mb, after swithching a few movies... Sometimes the CPU monitor still shows 100% but the ffmpeg process is not listed in the top 10. One thing is for sure: Serviio with all the involved processes is a resource hog. And there is no interfaced way to kill any of its processes nor to delete the temp files (by the way, what happens with they after playing stops or switches from one file to another?).

Image

And this is a screen taken later, when no files are played through Serviio server. Java takes a lot of memory and now there are 2 ffmpeg processes. I don't know what they are doing there...

Image

6. Almost all browsers lists all the UI pages with black background. I have tried with Opera, Ie and FF. Chrome is the only one that displays them correctly. The CSS style used for these pages might not be as it should so all browser could display them right.
Last edited by beckos on Tue Feb 22, 2011 7:19 pm, edited 3 times in total.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby gregoire » Tue Feb 22, 2011 3:07 pm

I'm still not sure what enhancement running serviio brings as opposed to playing from the nas via dlna. Since my nas is powerpc based and it's nearly impossible to install java I ran serviio on my pc. It worked nicely but I still couldn't catch anything different while using mediaplayer on my samsung ue46c6730. If anyone could explain the extra features to me?
DS-508, DS214Play
Samung UE46C6900
Wireless network.
gregoire
Versed
Versed
 
Posts: 257
Joined: Sun Oct 29, 2006 9:51 pm

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby beckos » Tue Feb 22, 2011 5:28 pm

@gregoire: Serviio can stream MKV to PS3 from Synology NAS. That is a big deal. Although Synology DLNA Media Server is quite good, it doesn't do the "simple" remux job needed to convert video files to a format that Playstation 3 can read. Same problems with XBox when used as DMA. Focus on PS3 word.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby patters » Tue Feb 22, 2011 7:01 pm

The advantage of Serviio is that rather than brute force transcoding any file that doesn't exactly fit with what your renderer device can play, it tries to salvage what it can from the existing streams and minimizes transcoding. Can't play DTS? No problem, we can transcode the audio but leave the H.264 alone. Can't play MKV on your TV? No problem, remux the files preserving the audio and video streams. No needless transcoding, maximum format support and fine for low CPU powered NAS devices.

@beckos - In answer to what Serviio does with transcoding temp files, it leaves them there until another transcode is initiated - presumably because you might press stop on the remote by accident and then want to continue watching the same file. If you switch file while an active transcode is in progress it will be terminated. Your constant high CPU is more than likely the problem with image thumbnailing. Did you restart Serviio completely after you made the config changes?
For my packages (Java, Serviio, CrashPlan, CrashPlan PRO, CrashPlan PROe, Minecraft, Craftbukkit, OpenRemote, and Bliss), add my repo URL to Package Center: http://packages.pcloadletter.co.uk
patters
Experienced
Experienced
 
Posts: 113
Joined: Mon Feb 07, 2011 3:41 am

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby beckos » Tue Feb 22, 2011 7:26 pm

@Patters: I have restarted the whole NAS several times, because there is no Kill Serviio button in the UI. And I am not familiar with Linux. I don't really know which restart caused the server to draw poster thumbs from internet. Now I have Online Metadata Sources selected.

Would have been nice for ffmpeg process to pause/stop the remuxing once the Pause button has been hit on the remote and then resume the process on Play. Or at least to be able to select and set the server behavior. Or have a button to remove temp content by hand. Etc. The really bad thing, in my opinion, is that there is no way of stopping the ffmpeg remux process once you hit the play button on your remote control. That is, if you just browse a movie for 5 minutes then decide not to watch it at all, you doomed the Nas's CPU for one hour or two, depending on how long the movie it is...

Anyway, without Serviio I couldn't watch MKV's with PS3, so I'm giving all the credit to it! I hope it will grow and support subtitles in PS3 soon.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby patters » Wed Feb 23, 2011 1:53 am

Couple of hours? Are you sure about that? I found that remuxing a 4GB movie only took several minutes, then the CPU went pretty much idle, and I'm fairly convinced that it you press stop on the remote it will send a DLNA request for byte range 0-0 and Serviio will kill the FFmpeg worker process. These questions should really be asked on the Serviio forum though.
For my packages (Java, Serviio, CrashPlan, CrashPlan PRO, CrashPlan PROe, Minecraft, Craftbukkit, OpenRemote, and Bliss), add my repo URL to Package Center: http://packages.pcloadletter.co.uk
patters
Experienced
Experienced
 
Posts: 113
Joined: Mon Feb 07, 2011 3:41 am

Re: Serviio DLNA server on Synology NAS with ARM CPU

Postby beckos » Wed Feb 23, 2011 8:01 am

... Yes, once started, the ffmpeg process keeps going on, even if I stop playing that movie. Maybe something is wrong here, but I don't know what and especially HOW to check it. I will launch a question in Serviio forum, though.

One thing I would do is uninstalling everything and make a new clean install, but again, I don't know how... Linux is a bit dark for me.

Late note: I have noticed that the ffmpeg process does stop after a while - for some files only. It may take two or three or some more minutes to stop... but for other files, the process continues. I have let the process to continue for 10 minutes and if I don't manually kill the prcocess it will go on.... I suppose for as long as the movie is.
Last edited by beckos on Thu Feb 24, 2011 11:05 am, edited 3 times in total.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA Server on Synology NAS

Postby beckos » Thu Feb 24, 2011 10:03 am

I noticed something that happens to some of the MKV video files when playing through PS3: If I stop playing then resume playing for the same file or start playing another file, the image will show artefacts (those little jerky squares around the moving objects in the image). I suppose the ffmpeg codec encounter some problems afterwards. Does this happens to others? What should I do? Any advice?

And one more thing: at some point the poster thumbnails were drawn from online databases for the movies in the library, but after adding new videos, they never draw thumbnails from internet. I have pressed the Rescan Video Metadata button and I have Saved the configuration; I have tried even the Force refresh button but with no results. The files can be played though, so I don't think there is a user rights problem...
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA Server on Synology NAS

Postby ErrK » Fri Feb 25, 2011 9:18 am

I have just got a DS211j and i want to play .mkv .mov files on my PS3 and use .srt subs.
Is it possible with Serviio or is there any other options?

Some of you have got the Serviio but i cant se that you have DS211j.
ErrK
I'm New!
I'm New!
 
Posts: 5
Joined: Fri Feb 25, 2011 9:10 am

Re: Serviio DLNA Server on Synology NAS

Postby beckos » Fri Feb 25, 2011 7:36 pm

Please read this tutorial. Is wrtitten by someone who installed it on a 211J model. http://pcloadletter.co.uk/2011/02/07/se ... h-arm-cpu/

You will not be able to see subtitles in PS3 as this feature is not supported by Serviio, yet.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Serviio DLNA Server not starting after upgrading to DSM3.1

Postby beckos » Wed Mar 02, 2011 11:13 am

I thaught I might share this experience with you all:

After upgrading from DSM3.0 to DSM3.1-1594 the Serviio Server didn't start. Checking it i've found that Serviio installation folder was removed along with some other installations, while others have remained, including all previous server settings, media library, PHP interface, etc. Java was there as well, so I didn't need to re-install it.

Here is what I had to reinstall to get Serviio 0.5 up and running again:

1. Serviio Server
2. libbz2
3. zlib
4. ffmpeg
5. re-create serviio daemon and moving it along with the other default synology daemons.

I hope this helps.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Re: Serviio DLNA Server on Synology NAS

Postby mark8par » Mon Mar 14, 2011 9:38 pm

Beckos,

I wonder if you could help point me in the right direction as i have updated firmware in my DS211J and tried to install Serviio but it does not work. I just need some simple to follow instructions.
mark8par
Student
Student
 
Posts: 79
Joined: Sat Jan 08, 2011 1:30 pm

Re: Serviio DLNA Server on Synology NAS

Postby beckos » Tue Mar 15, 2011 6:29 am

@mark8par: Have you tried the above measures? Aside from that, if it still doesn't work, I would totally reinstall everything. I am not a specialist, so I don't know what else to suggest. I just wrote what worked for me with my NAS.
DS712+ DSM 4.0 2228 2x Seagate ST2000DL003 / SHR
beckos
Experienced
Experienced
 
Posts: 142
Joined: Fri Jan 28, 2011 12:05 pm

Next

Return to Media Streaming Mods

Who is online

Users browsing this forum: No registered users and 2 guests