Emby server + OSMC on rpi2?

Hi!

Has anyone gotten Emby Server running on Osmc on Rpi2?

I’ve been messing with it but installation fails on mono and imagemagick.

Read that you’re supposed to be able to swap imagemagick for libgdiplus but seems the emby server packages is still dependant on imagemagick?

Also haven’t been able to get through the mono issue, tried mono-runtime, mono-complete, mono but all fail.

I don’t know if the pi2 will even handle any transcoding stuff but just as a centralised media info manager I’d love to be able to run emby :smile:

More info over at emby.media also on integration between kodi and emby, installation on debian and troubleshooting raspberry pi 2

mono was easy to get around just use aptitude and let it solve the issue for you, gonna try the rest

Setting up mono-4.0-gac (3.2.8+dfsg-10) ...
Setting up mono-gac (3.2.8+dfsg-10) ...
update-alternatives: using /usr/bin/gacutil to provide /usr/bin/cli-gacutil (global-assembly-cache-tool) in auto mode
Setting up mono-runtime-common (3.2.8+dfsg-10) ...
Setting up mono-runtime-sgen (3.2.8+dfsg-10) ...
Setting up mono-runtime (3.2.8+dfsg-10) ...
update-alternatives: using /usr/bin/mono to provide /usr/bin/cli (cli) in auto mode
Setting up libmono-corlib4.5-cil (3.2.8+dfsg-10) ...
Setting up libmono-security4.0-cil (3.2.8+dfsg-10) ...
Setting up libmono-system-xml4.0-cil (3.2.8+dfsg-10) ...
Setting up libmono-system4.0-cil (3.2.8+dfsg-10) ...
Setting up libmono-system-security4.0-cil (3.2.8+dfsg-10) ...
Setting up libmono-system-configuration4.0-cil (3.2.8+dfsg-10) ...
Processing triggers for libc-bin (2.19-18) ...

was that your output of

sudo aptitude install mono-complete

? Did you add any sources? I’ve tried with aptitude as well and it gets me nowhere

sudo aptitude install emby-server

this might break OSMC it wants to install a shitload of stuff :smiley:

this seems more secure to do

  1. installed dependencies (mostly got them from emby ubuntu package)
    aptitude install mono-runtime libc6 libmagickcore-6.q16-2 libmagickwand-6.q16-2 libmediainfo0 libmono-corlib2.0-cil libmono-corlib4.5-cil libmono-microsoft-csharp4.0-cil libmono-posix4.0-cil libmono-security4.0-cil libmono-sharpzip2.84-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-data-linq4.0-cil libmono-system-data2.0-cil libmono-system-data4.0-cil libmono-system-drawing4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-servicemodel4.0a-cil libmono-system-transactions4.0-cil libmono-system-web4.0-cil libmono-system-windows-forms4.0-cil libmono-system-xml-linq4.0-cil libmono-system-xml4.0-cil libmono-system2.0-cil libmono-system4.0-cil libsqlite3-0 mono-devel libsqlite3-dev sqlite3 libmagickwand-6.q16-dev libmagickcore-6.q16-dev perlmagick libwebp5

  2. downloaded MediaBrowser.Mono.zip
    wget https://raw.githubusercontent.com/MediaBrowser/MediaBrowser.Releases/master/Server/MediaBrowser.Mono.zip -O /tmp/MediaBrowser.Mono.zip

  3. unpacked it into /opt/mediabrowser

  4. gave it right permissions
    chown mediabrowser:mediabrowser /opt/mediabrowser -R

  5. made sure, that’s there is /var/lib/mediabrowser & has right permissions
    mkdir /var/lib/mediabrowser
    chown mediabrowser:mediabrowser /var/lib/mediabrowser -R

  6. put config (from deb ubuntu package) to /etc/default & stop/run script to /etc/init.d

  7. also made link from actual imagemagick lib in jessie to that old version that emby needs
    ln -s /usr/lib/i386-linux-gnu/libMagickWand-6.Q16.so /usr/lib/i386-linux-gnu/libMagickWand-6.Q8.so

Thanks! Will try this tonight, running a full backup of the filesystem atm

trying this atm aptitude install mono-complete

reject the first couple of suggestions so it finds better solutions then install it once it seems to get the complete package

bah their installation instructions are so utterly broken

HOLY SHIT 200+ packages ehrm, well why the hell not. But it seems like that is in conflict with the first step of your previous post (with mono-runtime)

Well trying to go through with this anyway, but I don’t really get which config file and which scripts to put where…

Edit:
DLing http://download.opensuse.org/repositories/home:/emby/xUbuntu_15.04/all/emby-server_3.0.5675.1_all.deb maybe this is it

EDIT2:
Hmm this is my output when trying to run

[....] Starting emby-server (via systemctl): emby-server.serviceFailed to start emby-server.service: Unit emby-server.service failed to load: No such file or directory.
failed!

Seems to be a mismatch between my configs which use the new emby namespace whereas the other steps were referencing mediabrowser
Do you have a copy of the configs you used?

didnt get it to run …

Since a made a complete backup before all this I might as well try the unsafe method of aptituding emby-server and see where it takes me.

At work now though so it’ll have to wait until tonight

trying docker installation of emby

INFO[0345] POST /v1.19/images/create?fromImage=emby%2Fembyserver&tag=latest 
latest: Pulling from emby/embyserver
511136ea3c5a: Pull complete 
53f858aaaf03: Downloading [==========================>                        ]  34.6 MB/65.77 MB
837339b91538: Download complete 
615c102e2290: Download complete 
b39b81afc8ca: Download complete 
8254ff58b098: Download complete 
ec5f59360a64: Download complete 
2ce4ac388730: Download complete 
2eccda511755: Download complete 
5a14c1498ff4: Download complete 
8780cd2d3231: Download complete 
1c7666d15fd3: Download complete 
0a32d98a2f3f: Download complete 
d5295186ffb8: Download complete 
1ea5e4803cd3: Downloading [======>                                            ] 32.43 MB/232 MB
d2c6f648c943: Download complete 
494274fa18ba: Download complete 

it has to be better then that horrible installation instructions they had

exciting! Report back with results (and instructions if successful :wink: )

Hmm somehow I got this running…
Followed the manual instructions.

Installed the dependencies listed there using aptitude, being careful to not accept solutions that would remove one of the other dependencies.

Ffmpeg you have to build yourself:

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

And then adjust the config files according to the instructions (I didn’t enter full paths, just the name of the file) and then started with

mono MediaBrowser.Server.Mono.exe -ffmpeg “/usr/src/ffmpeg/ffmpeg” -ffprobe “/usr/src/ffmpeg/ffprobe”

And it worked! For about five minutes after which it threw an exception an crashed.

EDIT:
A few error msgs thrown in for good measure

Info, ImageMagick, ImageMagick version: ImageMagick 6.8.9-9 Q16 arm 2015-01-05 http://www.imagemagick.org
Error, ImageMagick, Error loading webp:
*** Error Report ***
Version: 3.0.5675.1
Command line: /opt/MediaBrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/src/ffmpeg/ffmpeg” -ffprobe “/usr/src/ffmpeg/ffprobe”
Operating system: Unix 3.18.13.1
Processor count: 4
64-Bit OS: False
64-Bit Process: False
Program data path: /opt/MediaBrowser/ProgramData-Server
Mono: 3.2.8 (Debian 3.2.8+dfsg-10)
Application Path: /opt/MediaBrowser/MediaBrowser.Server.Mono.exe
delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310
ImageMagickSharp.WandException
  at ImageMagickSharp.WandCore`1[ImageMagickSharp.MagickWand].CheckError (Boolean status) [0x00000] in <filename unknown>:0
  at ImageMagickSharp.MagickWand.SaveImage (System.String path) [0x00000] in <filename unknown>:0
  at Emby.Drawing.ImageMagick.ImageMagickEncoder.TestWebp () [0x00000] in <filename unknown>:0

Error, HttpServer, Exception loading certificate: /opt/MediaBrowser/ProgramData-Server/ssl/cert_9c31b7884ea5475c8687970fc5996297.pfx
*** Error Report ***
Version: 3.0.5675.1
Command line: /opt/MediaBrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/src/ffmpeg/ffmpeg” -ffprobe “/usr/src/ffmpeg/ffprobe”
Operating system: Unix 3.18.13.1
Processor count: 4
64-Bit OS: False
64-Bit Process: False
Program data path: /opt/MediaBrowser/ProgramData-Server
Mono: 3.2.8 (Debian 3.2.8+dfsg-10)
Application Path: /opt/MediaBrowser/MediaBrowser.Server.Mono.exe
Input data cannot be coded as a valid certificate.
System.Security.Cryptography.CryptographicException
  at Mono.Security.X509.X509Certificate.Parse (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Mono.Security.X509.X509Certificate..ctor (System.Byte[] data) [0x00000] in <filename unknown>:0
  at System.Security.Cryptography.X509Certificates.X509Certificate2.Import (System.Byte[] rawData, System.String password, X509KeyStorageFlags keyStorageFlags) [0x00000] in <filename unknown>:0
  at System.Security.Cryptography.X509Certificates.X509Certificate2.Import (System.String fileName, System.String password, X509KeyStorageFlags keyStorageFlags) [0x00000] in <filename unknown>:0
  at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor (System.String fileName) [0x00000] in <filename unknown>:0
  at SocketHttpListener.Net.EndPointListener.LoadCertificateAndKey (System.Net.IPAddress addr, Int32 port, System.String certificateLocation) [0x00000] in <filename unknown>:0
InnerException: System.Security.Cryptography.CryptographicException
Input data cannot be coded as a valid certificate.
  at Mono.Security.X509.X509Certificate.Parse (System.Byte[] data) [0x00000] in <filename unknown>:0

And the final exception :frowning:

UnhandledException
The task has already completed
System.InvalidOperationException
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult () [0x00000] in <filename unknown>:0
at MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository+<UpdatePeople>d__3c.MoveNext () [0x00000] in <filename unknown>:0
at (wrapper unbox) MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository/<UpdatePeople>d__3c:MoveNext ()
at System.Threading.Tasks.AwaiterActionContinuation.Execute () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.ProcessCompleteDelegates () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Finish () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (System.Object obj) [0x00000] in <filename unknown>:0


Shutting down finalizer thread timed out.
Segmenteringsfel

Changed command to

sudo mono MediaBrowser.Server.Mono.exe -ffmpeg “/usr/local/share/man/man1/ffmpeg.1” -ffprobe “/usr/local/share/man/man1/ffprobe.1”

To see if a) sudo would help b) not to run from source directory but installation directory.

Checking the logs I get a whole lot of errors regarding ffprobe “error starting ffprobe” and “error in ffprobe”. I enabled debug logging, dunno if that’s why I got a more detailed shell output but the latest crash reads:

UnhandledException
The task has already completed
System.InvalidOperationException
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult () [0x00000] in <filename unknown>:0
at MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository+<UpdatePeople>d__3c.MoveNext () [0x00000] in <filename unknown>:0
at (wrapper unbox) MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository/<UpdatePeople>d__3c:MoveNext ()
at System.Threading.Tasks.AwaiterActionContinuation.Execute () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.ProcessCompleteDelegates () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Finish () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <filename unknown>:0
at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (System.Object obj) [0x00000] in <filename unknown>:0


Shutting down finalizer thread timed out.
Stacktrace:


Native stacktrace:


Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

wonder if they would accept those as bugreports

Posted over at the emby forum as well, no replies yet.
Tried just running that ffprobe command but I get a syntax error, so maybe it isn’t emby?

How’s your docker-thing going?

working as well as their installation instructions :smiley: they seriously gotta fix their shit cause the only way i got emby to work in under windows so its pretty much false advertising that they got linux support when your emulating dot net shit with windows exes

they should do a native server bin

or they could do a rpi 2 with windows 10 iot version

Those NAS-packages - Are they mono based as well? Shouldn’t the NAS devices be on par with the pi performance wise and linux based?