Koozali.org formerly Contribs.org

Serviio DLNA server

Re: Serviio DLNA server
« Reply #15 on: February 12, 2013, 12:43:34 PM »
I have Serviio 1.1 with Ajax WebUI 1.0.1-c.

Java version is 1.6.0_31
The Webui jar files are in the /opt/serviio/plugins folder.

I have set up a serviio-web service

Code: [Select]
mkdir -p /var/service/serviio-web
mkdir -p /var/service/serviio-web/log

Code: [Select]
cd /var/service/serviio-web/log
make a file run containing
Code: [Select]
#!/bin/sh
exec                                    \
    /usr/local/bin/setuidgid smelog     \
    /usr/local/bin/multilog t s5000000  \
    /var/log/serviio-web
Code: [Select]
cd /var/service/serviio-web
make the run file
Code: [Select]
#!/bin/sh

# Set up correct LANG
LANG=en_US
export LANG

# Setup SERVIIO_WEBUI_HOME
if [ "x$SERVIIO_WEBUI_HOME" = "x" ]; then
    # get the full path (without any relative bits)
    SERVIIO_WEBUI_HOME="/opt/serviio"
fi
export SERVIIO_WEBUI_HOME

# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
    else
JAVA="java"
    fi
fi

# Setup the classpath
WEBUI_CLASSPATH="$SERVIIO_WEBUI_HOME/config"
LIB=${SERVIIO_WEBUI_HOME}/plugins
for jar in `ls -1 ${LIB}/*.jar`; do WEBUI_CLASSPATH="${WEBUI_CLASSPATH}:${jar}"; done
LIB=${SERVIIO_WEBUI_HOME}/lib
for jar in `ls -1 ${LIB}/*.jar`; do WEBUI_CLASSPATH="${WEBUI_CLASSPATH}:${jar}"; done

# Setup Serviio specific properties
JAVA_OPTS="-Dserviio.home=$SERVIIO_WEBUI_HOME -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"
JVM_OPTS="-Xms5M -XX:+UseParNewGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -Dfile.encoding=UTF-8"


exec 2>&1
# Execute the JVM in the foreground
exec setuidgid serviio "$JAVA" $JVM_OPTS $JAVA_OPTS -classpath "$WEBUI_CLASSPATH" org.serviio.restui.RestletProxy "$@"

Code: [Select]
mkdir -p /var/log/serviio-web
touch /var/service/serviio-web/down
db configuration set serviio-web service status enabled TCPPort 8123 access private
ln -s /var/service/serviio-web /service/serviio-web
ln -s /etc/rc.d/init.d/daemontools /etc/rc.d/init.d/supervise/serviio-web
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S99serviio-web
chmod 755 /var/service/serviio-web/run
chmod 755 /var/service/serviio-web/log/run
chown smelog:smelog /var/log/serviio-web
chmod a+rw /var/log/serviio-web
db accounts set serviio ProxyPass Description Serviio_WebUI Target http://localhost:8123/serviio
service serviio-web start

This allows console access from http://<server>/serviio.
I don't use the shared wrapper, as I like the two services to be independent.
Try setting this up, stop the services (use ps -ef | grep java) to check,
then start serviio first, and then serviio-web.

Good luck.

Re: Serviio DLNA server
« Reply #16 on: February 12, 2013, 04:02:18 PM »
Thank you so much for further information, but I have followed the Wiki post with serviio in an ibay. Perhaps the two installs can be combined into a single one that I could get to work :-) Not saying your instructions a wrong, just that I followed the other route, which has files in different locations. Wished I had installed this in a VM first.
Perhaps a definitive download list and their locations that are known to work would be usefull for those of us with less knowledge on versions could use.

Thanks again for taking the time to help.

Infamy, Infamy, they all have it in for me!

Re: Serviio DLNA server
« Reply #17 on: February 12, 2013, 06:22:08 PM »
When I wrote the howto, the PHP Webui was about the only solution. When I rebuilt my server to SME 8, I updated my serviio install to use the Ajax Web UI. I can't edit the wiki page to update it, but the Ajax Web UI is a better way to go.

Delete the files in serviio ibay and the ibay itself.

Use groupadd to create a system group serviio (groupadd serviio)
Use useradd to create a system account serviio (useradd -g serviio serviio).

Download the latest Ajax Web UI (http://kairoh.bitbucket.org/serviio-webui/). Unzip the files, and copy them into /opt/serviio. The 2 jar files will end up in /opt/serviio/plugins.

Follow the instructions I added above to finish the Ajax Web UI install.



Re: Serviio DLNA server
« Reply #18 on: February 13, 2013, 11:58:40 AM »
Dumb question probably, are you saying use the (what the site says is a windows zip file) and the Linux one? Anyway, I have done that, and have copied the jar files into the plugins, sadly now all I get from http://server-ip/serviio is a 404 error

Was following as you advised yesterdays instructions.

[root@home plugins]# service serviio-web start
Starting serviio-web:                                      [  OK  ]


[root@home plugins]# service serviio start
Starting serviio:                                          [FAILED]

Sigh, little knowledge is dangerous, and I have very little knowledge.

« Last Edit: February 13, 2013, 12:46:08 PM by Drifting »
Infamy, Infamy, they all have it in for me!

Re: Serviio DLNA server
« Reply #19 on: February 13, 2013, 12:44:14 PM »
You need the Unix one - my mistake for not being clear enough. However, the zip file should have the same contents in the plugins directory.

When you extract the files (.zip or tar.gz), you should get a /bin directory (containing startup scripts that are not used), a /plugins directory and two readmes.
Move the contents of the /plugins directory (2 .jar files) into the /opt/serviio/plugins directory.

Re: Serviio DLNA server
« Reply #20 on: February 26, 2013, 02:45:10 PM »
I know perhaps I am being a bit thick here.

But I have followed to the best of my ability your install, did however get confused as to which parts I am supposed to remove / re install etc. Or even follow for that matter.

Could I be really awkward and ask for a blow by blow on an install?

Currently Serviio will not start, and I have no web page for it either !

Regards P
Infamy, Infamy, they all have it in for me!

Offline Jáder

  • *
  • 1,061
    • LinuxFacil
Re: Serviio DLNA server
« Reply #21 on: February 27, 2013, 11:43:20 AM »
When I wrote the howto, the PHP Webui was about the only solution. When I rebuilt my server to SME 8, I updated my serviio install to use the Ajax Web UI. I can't edit the wiki page to update it, but the Ajax Web UI is a better way to go.

Hi

I'm part of documentation team and would like to help you to update wiki.
Could you get the wiki content, update it on your computer using NOTEPAD or any text editor and send it to me directly jader.marasca @ gmail   or post here ?
You just need to post/send the changed parts... not all page ;)
I'll format and update wiki to everyone benefit!

Thanks

Jáder
...

Offline Knuddi

  • *
  • 540
    • http://www.scanmailx.com
Re: Serviio DLNA server
« Reply #22 on: March 05, 2013, 10:42:28 PM »
Dear all,

I have used minidlna (the dlna used in NetGear boxes) on both a SME 7 and 8 box and its super easy and runs on static libraries. Its works perfectly with my iPad and my Samsung LED.

http://sourceforge.net/projects/minidlna/files/minidlna/1.0.25/minidlna_1.0.25_static.tar.gz/download

/Jesper

Re: Serviio DLNA server
« Reply #23 on: August 14, 2014, 11:58:10 AM »
----> Knuddy

With latest upgrades (both by Serviio & Sme) I've not been able to have Serviio working at least as service (it seems Java processes interfering with both boot & shutdown), so I gave a chance to Minidlna and it was really a beatiful surprise.
Simple and static.
Did you make some tweak to manage it like a service or simply you put in autostart without further configurations (that, at a glance, it seems enough) ?

Nicola
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

guest22

Re: Serviio DLNA server
« Reply #24 on: August 14, 2014, 02:21:47 PM »
Nicola,

any chance you can draft up a wiki page about your efforts please?

Thanks,
guest

Re: Serviio DLNA server
« Reply #25 on: August 14, 2014, 05:54:32 PM »
The "failed one" with Serviio 1.4.x and Sme 8.1 or the "working one" with Minidlna ?
If the second one I'm still testing . . .

Nicola
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

guest22

Re: Serviio DLNA server
« Reply #26 on: August 15, 2014, 10:27:05 PM »
Both please, but especially the one that really works ;-)

Thanks,
guest

Re: Serviio DLNA server
« Reply #27 on: August 19, 2014, 03:18:10 PM »
Mindlna (now ReadyMedia) working like a daemon not like a real service (on Sme 8.1/32 with Hp Microserver NL36 with 2x2TB raid 1 on WD Black hdds).
First of all: the test may be affected by the former presence of Servviio, so is welcomed who can test on a "fresh SME".
This is a rough explanation of what I did that is not necessarily the best.
The Minidlna (now ReadyMedia) binary is available at SourceForge: the last (at august 19 2014) is 1.1.3.
http://sourceforge.net/projects/minidlna/files/minidlna/1.1.3/
Downloading the "static" version you get all media library compiled into the binary (so no need to install flac,libogg,libid3tag,libexif,sqlite,ffmpeg,libvorbis,libjpeg).
Once installed:
Quote
tar xzf minidlna_1.1.3_static.tar.gz -C /
the binary (minidlnad) is in /usr/sbin while conf is in /etc/minidlna.conf; the conf file is well commented so you can easily configure minidlnad (cache and log location, media folders ecc.). This is my conf (media files in ibays):

Quote
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
# network_interface=eth0

# specify the user account name or uid to run as
user=root

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
#   can prepend the types, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
#   + "PV" for pictures and video (eg. media_dir=PV,/home/jmaggard/digital_camera)
media_dir=A,/home/e-smith/files/ibays/musica/files
media_dir=V,/home/e-smith/files/ibays/film/files
media_dir=P,/home/e-smith/files/ibays/fotografie/files

# set this to merge all media_dir base contents into the root container
# note: the default is no
#merge_media_dirs=no

# set this if you want to customize the name that shows up on your clients
friendly_name=Mazzone DLNA Server

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/opt/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log/minidlna

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
#   which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=900

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# specify the path to the MiniSSDPd socket
#minissdpdsocket=/var/run/minissdpd.sock

# use different container as root of the tree
# possible values:
#   + "." - use standard container (this is the default)
#   + "B" - "Browse Directory"
#   + "M" - "Music"
#   + "V" - "Video"
#   + "P" - "Pictures"
#   + Or, you can specify the ObjectID of your desired root container (eg. 1$F for Music/Playlists)
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.

# always force SortCriteria to this value, regardless of the SortCriteria passed by the client
force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title

# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while streaming
#max_connections=50
The daemon is run as root
Then I made some db additions:
Quote
db configuration set minidlnad service
db configuration setprop minidlnad TCPPort 8200
db configuration setprop minidlnad UDPPort 1900
db configuration setprop minidlnad TCPPort 1900
signal-event remoteaccess-update
manually started with  /usr/sbin/minidnad works fine
to have it in autostart I put it in /etc/rc.d/init.d/local
Quote
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/usr/sbin/minidlnad

I tested only with WMP12 and VLC 2.0.8 (this seems the last release working with uPnP, latest releases all crashing), no SmartTV, with success (some problem with some file MP3 not scanned or video not reproducing but they seem problems you can experience with Qnap or Netgear boxes or other DLNAs too, due to bad file encoding).
I'm not able to say if all the "multicast" config done for Serviio is necessaryfor Minidna too: on this system, previously using Serviio, multicast settings is still existing.

Some people on Centos 6 can set it up as service: http://blog.irq1.com/install-minidlna-centos/ . I've not been able to do this with Sme.

Nicola
« Last Edit: August 19, 2014, 10:05:49 PM by nicolatiana »
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.

Re: Serviio DLNA server
« Reply #28 on: August 19, 2014, 03:46:47 PM »
Serviio not working: I tried to upgrade Serviio, together with Sme pushed from a 8 to 8.1 (32). The current version of serviio is serviio-1.4.1.2-linux.tar.gz.
I followed the wiki how-to to perform a fresh install of Serviio with the following results:

the service start generates lots of Java processes coming from this command:
Quote
# Execute the JVM in the foreground
"$JAVA" -Xmx512M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
this cause a console "hang" after the message "Starting Serviio OK"; the server is not inconsistent: you can connect to another console with Alt+F2 or putty and killing some Java processes the boot completes (on console);

the same java processes seem to prevent a clean shutdown of the server that hangs indefinitely after the "killall" message.
stopping manually serviio service and killing with a "machete" all of the java processes the system can shutdown in a clean way.

I tried to replace standard java package with Oracle java: no joy.

Apart this "small" issues  :-? the server worked fine, except the Webui that still does not allow to browse filesystem to select media folder (ajax console was still the working tool to select folders).

I abandoned and passed to MinDlna because I had to return back the server to the customer and I had few time to attempt further solutions.

Nicola

Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia.