GMediaServer - GNU UPnP media server (MIPSel)

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 06:19, 5 January 2007 by (Talk) (Overview)

Jump to: navigation, search
Originally by AndreGauthier from


GMediaServer is a UPnP compatible media server for the GNU system. It is part of the GNU project.

GMediaServer serves audio and video files to certain network connected media players. Most hardware media players only play music and/or video—they don't provide the media themselves. Those media files have to come from a device on the network. GMediaServer is a server for such UPnP compatible media players, including:

Other UPnP media players (including software based) may work as well—see the manual for a more complete list.

GMediaServer is written in C by Oskar Liljeblad. It should compile and run on any modern POSIX compatible system such as GNU/Linux. GMediaServer is a console based application which is usually run in the background. It is free software, licensed under the terms of the GNU General Public License.


You need to install at least the g++ (you might have the rest) from the build-essential packages (i.e., libc6-dev gcc g++ make dpkg-dev):

apt-get install g++

Apt get dependancies

apt-get install libmagic1 libmagic-dev libid3-3.8.3 libtagc0 libtagc0-dev libuuid1 uuid-dev 

Then get the source files install them


Configure, make and install libupnp1.3.1

tar -xvzf libupnp-1.3.1.tar.gz 
cd libupnp-1.3.1
make install

Then configure, make and install gmediaserver

tar -xvzf gmediaserver-0.12.0.tar.gz 
cd gmediaserver-0.12.0 
./configure --prefix=/mnt/hda/gmedia
make install

OpenLink (MIPSel)


  1. Linkstation2
  2. OpenLink - (from the downloads section and installed as per README).
  3. Precompiled C development environment, running on the LS - mipsel-tools-2.tgz (from the downloads section and installed with the
  4. mipsel-screen-1.tgz (from the downloads section and installed with the (NOT REQUIRED but the compile takes ages and this helps if you get disconnected when it is running).
  5. /usr/bin/sort extracted from the debian package coreutils-5.2.
  6. gmediaserver-latest.tar.gz from
  7. obtain required libraries.

Required Libraries

The libraries were downloaded from my local debian mirror and I used alien -t <debfile> to convert them to tgz files which were extracted into the root of the link station.

  • libid3-3.8.3-3.8.3.tgz
  • libupnp-dev-1.2.1.tgz
  • libid3-3.8.3-dev-3.8.3.tgz
  • libupnp0-1.2.1.tgz


tar -xvzf gmediaserver-0.12.0.tar.gz 
cd gmediaserver-0.12.0 
./configure --prefix=/mnt/hda/gmedia
make install


  • If you add media you should restart the server as it will need to rescan the directories*
  • Insert init script into /etc/init.d (See Below)
cd /etc/rc.d/rc2.d
ln -s ../init.d/gmserver S98gmserver
cd ../rc0.d
ln -s ../init.d/gmserver K02gmserver
cd ../rc6.d
ln -s ../init.d/gmserver K02gmserver
  • Disable the pcast server (use the web interface).
  • Run the gmedia init script with a start parameter.
  • Wait a while as it scans the whole collection on every startup.

( you should edit the script to change the directory that should be shared. )

# gmediaserver - startup script for gmediaserver 
# This goes in /etc/init.d and gets run at boot-time.
# . /etc/timezone



if ! [ -x $GM_HOME/bin/gmediaserver ]; then
       exit 0

case "$1" in

       echo  "Start services: gmediaserver"
       $GM_HOME/bin/gmediaserver -b -i eth0 --friendly-name=$NAME \
           -o $GM_HOME/log/server.log -v1 $DIR
       echo  "Stop services: gmediaserver"
       /sbin/start-stop-daemon --stop --quiet --exec $GM_HOME/bin/gmediaserver
       sleep 1
   echo "usage: $0 { start | stop | restart}" >&2
   exit 1

exit 0