No renderer 'pdf' found for mode 'pdf'

This is an old revision of the document!


Emby Media Server on NB2800

This article shows you how to install and run an Emby Media Server on your router (e.g. NB2800)

Preparations

All preparations made are described in this article: How to set up a NB2800 File Server

If you need instructions on how to set up a LXC Container on NB2800 Routers, you can refer to this page: http://wiki.netmodule.com/app-notes/virtualisation.

Install Emby

Emby is a freemium server/client-based media platform. It connects metadata to your files and lets you show your media on a huge variety of client devices.

Before the installation of Emby Media Server starts, some other programs have to be installed:

apt-get install libavcodec-extra gnupg2 ffmpeg

Now the installation package can be downloaded:

wget https://github.com/MediaBrowser/Emby/releases/download/3.2.70.0/emby-server-deb_3.2.70.0_armhf.deb

After the download completed, the installation can be started:

dpkg -i emby-server-deb_3.2.70.0_armhf.deb

After the installation is completed, you can start the setup over your web browser by entering http://IP-address-of-your-container:8096

In the first window, select your preferred language:

Now enter a name that will be displayed in Emby and, optional, you can login to an existing Emby account.

Here you can add some folders which contain different types of media. You can add existing folders here or create and add them later.

To customise your media, Emby can add some meta datas to them. Here you can select a preferred language of these meta datas.

In this window you can make some additional settings to the server.

Here you have to accept the terms of licence - and can read them of course.

Click on “Finish” and your router is ready.

Transcoding

Emby provides media files to his clients by transcoding them teporarily to a format that the client can play directly. This function secures that every client can play every type of media in exact the same way without any compatiblity problems. The disadvantage of this function is that the server has to transcode every of the files played. This results in a high CPU load on the router, exspecially when the server has to transcode several files at a time. With this little workaround, you can tell the server only to play files which the clients can transcode/play directly by themselves. Every other file will not be played. This workaround only works if you are logged in with the user “emby”. If you want the player to play all media files provided, you can simply login to the server with another user name.

First, go to the Emby directory:

cd /opt/emby-server/bin

Next, rename your ffmpeg:

mv ffmpeg ffmpeg.bin

USER
root@LXC_MEDIA:/opt/emby-server/bin# ls -l total 316 -rwxr-xr-x 1 root root 583 Aug 22 2017 emby-server -rw-r–r– 1 root root 232 Feb 9 13:00 ffmpeg -rwxr-xr-x 1 root root 198184 Aug 22 2017 ffmpeg.bin -rwxr-xr-x 1 root root 111088 Aug 22 2017 ffprobe

Now make a new file

nano ffmpeg

which contains the following:

ffmpeg
#!/bin/bash
if [ "$USER" != "emby" ]; then
        /opt/emby-server/bin/ffmpeg.bin "$@"
else
	source=`echo "$@" | sed -e 's/.* -i file://' -e 's/ -map .*//'`
	target=`echo "$@" | sed -e 's/.* -y //'`
 
	ln -- "$source" "$target"
fi

The best video codec that almost every web browser on the most clients can play directly is h.264.

Run Emby

You can provide a link to your Emby Server to your customers. The media files can be viewed in web browsers, the Emby app and -if enabled- over the built-in DLNA server.