Posts tagged with: media server

Serviio DLNA media server

Media server is becoming more and more widespread as the need for it arises. Due to the demand, there are a lot of multimedia boxes created for it that allow playing of video, audio and pictures. As these multimedia boxes improve, like Eaget or WDTV and so on, they even integrate possibility to stream medias from the internet such as youtube or PPS. Now, TV manufacturers do not want to be left behind. So, all modern TVs are being build to support media streaming from LAN or Internet. One of the main protocol adopted is the DLNA system. Refer to the Wiki here for more details.


DLNA is basically some sort of service that provide media streaming to devices that uses it. These devices can be TV, media boxes, ipad and computers. There are a few other formats besides DLNA such as UPnP and so on. Not sure what the main difference but all of them basically allow streaming of medias. I dive in this DLNA when I got myself a Panasonic LED TV. I encountered upon DLNA when I was doing some R&D for buying new TV. After knowing what DLNA is, I immediately wanted to give this thing a try.

In order to allow the DLNA TV or ipad (lots of apps now support DLNA/UPnP) to stream media, you first need a DLNA server. This is synonymous to something like a filesharing server or samba server (for those who are more technically incline). That means installing the DLNA server software in your NAS or server or desktop and so on. There are tons of DLNA servers out there support from Linux to Windows to Macs. Some are commercial and some are freeware. As a person who is used to using opensource software, obviously I will opt for a free version of such product. I have looked into a few and eventually I went into using miniDLNA. This miniDLNA is very simple and easy to setup. However, upon delving deeper into DLNA world, I found it to lack a lot of feature. Especially on streaming with subtitle and transcoding. Transcoding is a term used to describe the capability of DLNA servers to re-encode the video into a format that your TV understand. For example, your TV does not support MKV file format. With transcoding, the DLNA server will re-encode the video on-the-fly into mpeg2 format that your TV support. This is a very powerful feature that make DLNA so useable because users need not to worry about playing files with all sort of formats. The problem with transcoding is that it is still now that well implemented yet. DLNA is relatively a very new thing. A lot of the features or capabilities are not really stable yet.


Anyway, due to the limitation of miniDLNA, I eventually stumble upon Serviio. This is a free (at this moment of writing) DLNA server that support all sorts of platforms including Windows, Macs and most importantly Linux. Naturally, this is best to be tested by my HP Proliant Micro Server running Ubuntu 10.04LTS. What I like about Serviio is it’s community in the forum which is a bunch of helpful chaps. The developer is always around to answer questions and help with technical support. There are also a bunch of customization which is posted for different brand of TVs. That is because different manufacturer implement DLNA differently. So customization for TV is very important to allow transcoding and subtitles to work properly.

The latest version of Serviio is 0.6 which was released yesterday. So it’s totally hot off the SVN and it improve a lot from previous version. Serviio is Java based application and it depends a lot on FFmpeg for it’s transcoding capability. I will post more about Serviio 0.6 after I am done upgrading from my old version of 0.5.2 and tested it out.


As promised, here are some more information on Serviio 0.6. Heck I will throw in my upgrade experience from 0.5.2 to 0.6 for those having problems to reference.

This is for Ubuntu 10.04LTS and it might work on other linux distro but proceed at your own risk. And assuming you have already installed 0.5.2 previously and already have all the necessary packages needed to compile FFmpeg.

  1. Download Serviio 0.6, FFmpeg and libRTMP 2.4 from official website
  1. Untar all the files:
tar -zxvf rtmpdump-c58cfb3e9208c6e6bc1aa18f1b1d650d799084e5.tar.gz
tar -zxvf ffmpeg-8bc3a4807e2da36f458e7784c3d390dbd19899a5.tar.gz
tar -zxvf serviio-0.6-linux.tar.gz
  1. Compile rmptdump:
cd rtmpdump
make install
  1. Compile FFmpeg:
cd ../ffmpeg
./configure --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-pthreads --disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include
make install

##check to confirm ffmpeg has been updated
ffmpeg -version
ffmpeg version 0.8.git, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 24 2011 01:49:45 with gcc 4.4.3
configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg
--disable-ffplay --disable-ffserver --enable-libmp3lame --enable-pthreads
--disable-mmx --extra-ldflags=-L/tmp/static/lib --extra-cflags=-I/tmp/static/include
libavutil    51. 11. 0 / 51. 11. 0
libavcodec   538. 0 / 538. 0
libavformat  536. 0 / 536. 0
libavdevice  532. 0 / 532. 0
libavfilter   2. 25. 0 /  2. 25. 0
libswscale    20. 0 /  20. 0
ffmpeg 0.8.git
libavutil    51. 11. 0 / 51. 11. 0
libavcodec   538. 0 / 538. 0
libavformat  536. 0 / 536. 0
libavdevice  532. 0 / 532. 0
libavfilter   2. 25. 0 /  2. 25. 0
libswscale    20. 0 /  20. 0

## if the version is still showing old one then just copy the ffmpeg file directly and replace existing file
##shows the location of current ffmpeg binary
which ffmpeg

##assuming your current path is in the compiled ffmpeg source which you should
##be assuming you have been following this guide from start
cp ffmpeg /usr/local/bin/ffmpeg
  1. Untar serviio 0.6 and replace existing version:
cd ..
## rename old version just in-case need to restore back
mv /usr/share/serviio /usr/share/serviio.old
mv serviio-0.6 /usr/share/serviio
  1. Restart serviio and it should work (assuming you have the ubuntu restart script installed):
/etc/init.d/serviio restart

Once you have done with the restart and assuming it works, you will need to open serviio console and reconfigure your settings again. I prefer it this way as it will make sure the configs are fresh and does not get any incompatible stuffs from previous version.