Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualisation:media-portal [2018/02/23 12:50]
buettner
virtualisation:media-portal [2018/02/28 11:50] (current)
buettner
Line 1: Line 1:
-Emby Media Server on NB2800+===== Emby Media Server on NB2800 ​=====
  
 +This article shows you how to install and run an Emby Media Server on your router (e.g. NB2800).
  
 +[[https://​emby.media/​|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.
  
 +
 +===Preparations===
 +
 +All preparations made are described in this article: [[http://​wiki.netmodule.com/​virtualisation/​file-server | 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===
 +
 +Before the installation of Emby Media Server starts, some other programs have to be installed:
 +<​code>​
 +apt-get install libavcodec-extra gnupg2 ffmpeg
 +</​code>​
 +Now the installation package can be downloaded:
 +<​code>​
 +wget https://​github.com/​MediaBrowser/​Emby/​releases/​download/​3.2.70.0/​emby-server-deb_3.2.70.0_armhf.deb
 +</​code>​
 +After the download completed, the installation can be started:
 +<​code>​
 +dpkg -i emby-server-deb_3.2.70.0_armhf.deb
 +</​code>​
 +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:
 +{{ :​virtualisation:​emby-setup_1.png?​nolink&​600 |}}
 +
 +
 +Now enter a name that will be displayed in Emby and, optional, you can login to an existing Emby account. ​
 +{{ :​virtualisation:​emby-setup_2.png?​nolink&​600 |}}
 +
 +
 +Here you can add some folders which contain different types of media. You can add existing folders here or create and add them later.
 +{{ :​virtualisation:​emby-setup_3.png?​nolink&​600 |}}
 +
 +
 +To customise your media, Emby can add some meta datas to them. Here you can select a preferred language of these meta datas.
 +{{ :​virtualisation:​emby-setup_4.png?​nolink&​600 |}}
 +
 +
 +In this window you can make some additional settings to the server.
 +{{ :​virtualisation:​emby-setup_5.png?​nolink&​600 |}}
 +
 +
 +Here you have to accept the terms of licence - and can read them of course.
 +{{ :​virtualisation:​emby-setup_6.png?​nolink&​600 |}}
 +
 +
 +Click on "​Finish"​ and your router is ready.
 +{{ :​virtualisation:​emby-setup_7.png?​nolink&​600 |}}
 +
 +{{ :​virtualisation:​emby_ready_1.png?​nolink&​600 |}}
 +
 +===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:
 +<​code>​
 +cd /​opt/​emby-server/​bin
 +</​code>​
 +Next, rename your ffmpeg:
 +<​code>​
 +mv ffmpeg ffmpeg.bin
 +</​code>​
 +
 +<​konsole>​
 +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
 +</​konsole>​
 +
 +Now make a new file
 +<​code>​
 +nano ffmpeg
 +</​code>​
 +which contains the following:
 +<code c 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
 +</​code>​
 +
 +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.