Obsolete Releases > SME 8.x Contribs
Serviio DLNA server
si_blakely:
Serviio (http://serviio.org) is a DLNA server, allowing you to share media (Photos, Audio and Video) files to compatible devices. Serviio has a wide range of DLNA Profile support, including many TVs, Disc Players, PS3 and XBox360. It also allows transcoding and container changing.
It is written in Java - I have used Iced-Tea from rpmforge. It works just as well with Sun Java. ffmpeg and mencoder are installed for transcoding.
Make a serviio ibay - this creates a serviio user and somewhere for the web-based console.
Set it for local internet access only, allow executable content
--- Code: ---wget https://github.com/downloads/mpemberton5/Web-UI-for-Serviio/WebUI%20v1.0.zip
unzip "WebUI v1.0.zip"
cp -Rf serviioweb/* /home/e-smith/files/ibays/serviio/html
rm -f /home/e-smith/files/ibays/serviio/html/index.html
--- End code ---
--- Code: ---db yum_repositories set rpmforge repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled
signal-event yum-modify
yum install ffmpeg mplayer mencoder libdvdnav vobcopy java-1.7.0-icedtea --enablerepo=rpmforge
wget http://download.serviio.org/releases/serviio-0.6.2-linux.tar.gz
tar -xvf serviio-0.6.2-linux.tar.gz
mv serviio-0.6.2 /opt/serviio
chown -R serviio:serviio /opt/serviio/library
mkdir /opt/serviio/log
chown -R serviio:serviio /opt/serviio/log
mkdir -p /var/service/serviio
mkdir -p /var/service/serviio/log
--- End code ---
--- Code: ---cd /var/service/serviio
--- End code ---
make a file run containing
--- Code: ---#!/bin/sh
# Set up correct LANG
LANG=en_US
export LANG
SERVIIO_HOME="/opt/serviio"
export SERVIIO_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
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"
# Setup Serviio specific properties
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME"
exec 2>&1
# Execute the JVM in the foreground
exec setuidgid serviio "$JAVA" -Xmx384M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
--- End code ---
--- Code: ---cd /var/service/serviio/log
--- End code ---
make a file run containing
--- Code: ---#!/bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/serviio
--- End code ---
--- Code: ---mkdir -p /var/log/serviio
touch /var/service/serviio/down
db configuration set serviio service status enabled TCPPort 8895 UDPPort 1900 access private
ln -s /var/service/serviio /service/serviio
ln -s /etc/rc.d/init.d/daemontools /etc/rc.d/init.d/supervise/serviio
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98serviio
chmod 755 /var/service/serviio/run
chmod 755 /var/service/serviio/log/run
chown smelog:smelog /var/log/serviio
chmod a+rw /var/log/serviio
--- End code ---
edit /opt/serviio/config/logj4.xml and change the logfile location
--- Code: ---<param name="File" value="/var/log/serviio/serviio.log" />
--- End code ---
Make a masq template fragment to allow multicast on the internal interface
--- Code: ---mkdir /etc/e-smith/templates-custom/etc
mkdir /etc/e-smith/templates-custom/etc/rc.d
mkdir /etc/e-smith/templates-custom/etc/rc.d/init.d
mkdir /etc/e-smith/templates-custom/etc/rc.d/init.d/masq
touch 39AddMulticastRoute
touch 40DenyMulticast
--- End code ---
edit 39AddMulticastRoute to contain
--- Code: ---# add a multicast route on the internal interface for DLNA
/sbin/route add -net 239.0.0.0 netmask 255.0.0.0 $INTERNALIF
--- End code ---
edit 40DenyMulticast and insert
--- Code: --- # Drop all multicast traffic. Note that anything on from a local network
# will have already been accepted via the local_chk chain.
/sbin/iptables --append INPUT -s 224.0.0.0/4 -j denylog
/sbin/iptables --append INPUT -d 224.0.0.0/4 -j denylog
{
$OUT .= " /sbin/iptables --append OUTPUT -s 224.0.0.0/4 -d $LocalIP -j ACCEPT\n";
$OUT .= " /sbin/iptables --append OUTPUT -d 224.0.0.0/4 -s $LocalIP -j ACCEPT\n";
}
/sbin/iptables --append OUTPUT -s 224.0.0.0/4 -d $OUTERNET -j denylog
/sbin/iptables --append OUTPUT -d 224.0.0.0/4 -s $OUTERNET -j denylog
--- End code ---
Expand the template, and restart services
--- Code: ---expand-template /etc/rc.d/init.d/masq
service masq restart
service serviio start
--- End code ---
You can now browse to http://Server/serviio to complete configuration.
Content directories you add must be readable by the Serviio user. Ibays readable by everyone are ok. I have used the SharedFolders (http://http://wiki.contribs.org/SharedFolders)contrib for some media, so I had to set those to ManualPermissions and added a read ACL for serviio.
Have fun
Franco:
Really nice!
I'm almost done getting it to run, but still a few problems left.
There's a openbasedir on /tmp which can fixed with:
--- Code: ---db accounts setprop serviio PHPBaseDir /home/e-smith/files/ibays/serviio/html/:/tmp
--- End code ---
Also there's this error, which does not allow me to enter online sources:
--- Code: ---Apr 29 22:47:12 sme8 httpd: PHP Warning: scandir() [<a href='function.scandir'>function.scandir</a>]: (errno 13): Permission denied in /home/e-smith/files/ibays/serviio/html/tree/jquery_folder_tree/jquery.foldertree.php on line 40
--- End code ---
Any hints on how to fix it?
Thanks,
si_blakely:
Franco,
I had only used the WebUI to add folders and start/stop the services. Having just tried to set the Presentation options and add online feeds, I discovered that that did not work too well, either. It has been a bit disappointing from that point of view, and ServiiDroid (an Android management client) has been much better.
I may have a crack at the Java html interface - I still want all the web management capability. I just want it to work with a minimum of hassle.
Simon
gajol:
hi,
thx for the how to. i have this problem: i've got in the web interface:
WARNING: There is a version mismatch between Serviio and Web UI. There may be a loss of functionality.
In About no Serviio Version is shown ; WebUi Vers. 1.0
I updated the WebUI to 1.2 - The Error Message now wasn't shown, but every input in the webinterface show a "parsererror"
I found this some workarounds at the web, but nothing worked for me.
What could the problem?
si_blakely:
I have not tried the latest PHP web-UI - I started using ServiiDroid - an Android app that controls serviio.
Sorry I cannot help
Simon
Navigation
[0] Message Index
[#] Next page
Go to full version