So this a new thread sprung from Emby server + OSMC on rpi2?
If you’re not familiar with Emby, check out www.emby.media
#What
In essence Emby, formerly MediaBrowser is a server software intended to provide an open source media server that can be used as a fancy DLNA server as well as through their own apps. It can also be tightly integrated with Kodi which is why I’m posting this
When integrated with kodi/Osmc Emby provides a great way to manage your media and metadata from any web browser as well as sync play positions between devices - Running Kodi or anything else!
Here’s a video showing how and why it integrates with Kodi:
So here’s the installation instructions. While they aren’t that complicated they do require you to be somewhat familiar with the terminal and have a bit of free time.
###Note: I have Emby-Server running flawlessly on my OSMC rpi2. Haven’t tried streaming or other DLNA devices yet so I can’t vouch for that. Haven’t integrated it into my Kodi installation yet so I can’t say how that works either, basically this is a proof of concept. Also it was a pain to get this up and running without instructions, thus these instructions are made as an afterthought and I might’ve missed something. Please tell me if you’ve tried the guide and something doesn’t work and I’ll try to get it sorted
#HowTo
###Prerequisites:
Aptitude, unzip, git. Can be installed through apt-get:
sudo apt-get install aptitude unzip git
###1) Dependencies
Install dependencies using aptitude. Be sure to check the suggestions that aptitude throws at you, it might suggest to skip some of the packages, just say no to that suggestion until a better one comes along. If it doesn’t, try splitting these into several commands instead of installing them at once.
sudo aptitude install imagemagick imagemagick-6.q16 imagemagick-common libimage-magick-perl libimage-magick-q16-perl libmagickcore-6-arch-config libmagickcore-6-headers libmagickcore-6.q16-2 libmagickcore-6.q16-2-extra libmagickcore-6.q16-dev libmagickwand-6-headers libmagickwand-6.q16-2 libmagickwand-6.q16-dev libmagickwand-dev webp mediainfo sqlite3
###2) FFmpeg
Now we need to build ffmpeg from source
Note: This will take time. Serious time. I left this on overnight
sudo aptitude remove ffmpeg
cd /usr/src
sudo mkdir ffmpeg
sudo chown `whoami`:users ffmpeg
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make && sudo make install
###3) Get Mono
The next step is to get mono (the package, not the disease). While available through the official debian repo that version (2.3) is too old - Recommended version is ≥4. Therefore we need to get it from the maker of mono, Xamarin.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
4) Emby - Aka MediaBrowser
The next step is to get and configure Emby.
Download and unpack
wget https://raw.githubusercontent.com/MediaBrowser/MediaBrowser.Releases/master/Server/MediaBrowser.Mono.zip -O /tmp/MediaBrowser.Mono.zip
unzip /tmp/MediaBrowser.Mono.zip -d /opt/mediabrowser
Configure
Configure by editing the following three files so that they point to the correct versions of their corresponding libraries. It should be safe to just copy my files, but if you run into troubles you can edit them yourself using the instructions at the bottom of this section:
/opt/mediabrowser/ImageMagickSharp.dll.config
<configuration>
<dllmap dll="CORE_RL_Wand_.dll" target="libMagickWand-6.Q16.so.2" os="linux"/>
<dllmap dll="CORE_RL_Wand_.dll" target="libMagickWand-6.so" os="freebsd,openbsd,netbsd"/>
<dllmap dll="CORE_RL_Wand_.dll" target="./MediaInfo/osx/libmediainfo.dylib" os="osx"/>
</configuration>
/opt/mediabrowser/System.Data.SQLite.dll.config
<configuration>
<dllmap dll="sqlite3" target="libsqlite3.so.0" os="linux"/>
</configuration>
/opt/mediabrowser/MediaBrowser.MediaInfo.dll.config
<configuration>
<dllmap dll="MediaInfo" target="./MediaInfo/osx/libmediainfo.dylib" os="osx"/>
<dllmap dll="MediaInfo" target="libmediainfo.so.0" os="linux"/>
</configuration>
If this doesn’t work for you, the easiest way to do this yourself is to run
dpkg-query -f '${binary:Package}\n' -W
to list all your installed packages, make a note of the exact names of the packages for libMagickWand, sqlite3 and mediainfo and then run
dpkg -L <packagename>
to find the name of the actual file and enter it in the config files
5) Cleanup:
sudo apt-get clean
sudo rm -R /usr/src/ffmpeg
sudo rm /tmp/MediaBrowser.Mono.zip
6) Run!
Test your creation (sudo might not be required):
sudo mono /opt/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/local/share/man/man1/ffmpeg.1” -ffprobe “/usr/local/share/man/man1/ffprobe.1”
Your Emby-Server should now be available for you at http://(yourip):8096
Also, don’t forget too add the addons for Kodi - They are available on http://emby.media/downloads/emby-for-kodi/
##Extra
To run this at startup you could easily add that to the crontab file to run at reboot, a better way would probably be to add it as a system service so that it could be set to restart if it crashes. If I do this I’ll post my file here, if anyone else does they’re more than welcome to post theirs