OpenELEC Forum
Emby Server running inside OpenELEC - Printable Version

+- OpenELEC Forum (
+-- Forum: Generic Forum (
+--- Thread: Emby Server running inside OpenELEC (/showthread.php?tid=81142)

Emby Server running inside OpenELEC - granroth - 04-23-2016

Kodi + Emby Rationale

OpenELEC + Kodi is a pretty sweet combination but Kodi itself had two flaws that combined were initially deal breakers to me. The first flaw was the lack of support for remote streaming. The second and far more egregious flaw was the staggering horrible way that Kodi handles movie metadata and file management. It's hard to imagine a system that's more of a pain and less intuitive than the way Kodi does it.

Handily, though, both Plex and Emby have add-ons for Kodi that help alleviate the problem. Both are first class streaming solutions and both have thoroughly modern metadata management capabilities. Of the two, I tend to prefer Emby for pairing with Kodi since it is Open Source; is somewhat more powerful and flexible; and (crucially) integrates fully with Kodi rather than act as a side-loaded after thought.

The remaining issue for me was that I didn't want to have to run a separate server just to run Emby Server. I wanted it to run directly on my HTPC to eliminate any network issues as well as reduce the number of needed running hardware components. This is far trickier than just installing it, like one would if running Kodi on a generic OS, since OpenELEC would need the Emby Server to be part of the disk image to work properly.

OpenELEC Emby Fork

Therefore, I hacked in support for Emby Server and all dependencies (chiefly 'Mono') into a forked version of the OpenELEC master branch. It is here:

I made all of the necessary edits in the 'kodi-emby' branch and tried to partition each distinct change into its own patch.

I have been regularly merging the branch into the mainline master so that anybody that clones the forked repo can do a "normal" build and automatically get all of the latest goodness plus the Emby Server support.


I wrote up a quick tutorial on how to use this fork on my blog:

I also created a video for those who prefer talking heads and moving pictures:

Regulars to this forum will likely find nothing new in either of those, as they are aimed at people without extensive OpenELEC experience. If you do take a look and find anything notably (or even passingly) wrong, please let me know!

The Drawbacks

My custom OpenELEC image is working fantastically for me -- the Emby Server runs silently in the background and its integration with Kodi has so-far proven flawless. I couldn't be happier, since it turned OpenELEC+Kodi from a non-starter to a close to ideal HTPC.

But... there are some flies in the ointment. They are the reason why my fork is remaining separate and I haven't submitted a pull request to date (nor will I).

The first and most fatal problem for mainstream inclusion is that I was unable to coax the OpenELEC build system to build 'mono' from source. The package built just fine on the build box using what I thought was the OpenELEC gcc options but when it was built in the context of the image builder, it threw some very esoteric errors that maybe I could have figured out 10 years ago when I did constant C development... but no longer. I gave up after a few tries and instead created a package that pulls in a pre-compiled mono package from Arch Linux in x86_64 format. Arch Linux because it had the most straightforward tar based packaging I found.

This means that my forked version can only run on x86_64 boxes.

The second issue is that I could not find a way to include the Kodi-Emby add-on repo to the OpenELEC list and so didn't not find a way to include the needed add-on by default. This required the necessary additional steps just to active Emby, which shouldn't be necessary if it's part of the system.

The Future

As I said, the fork works for me as-is and so I'm not planning on devoting notable amount of time on it going forward. I will likely re-merge with master every so often, but that's likely it. I put this out there for two reasons:

1. Hopefully some people who want this same functionality as me will find this useful!
2. It would be nice if somebody could pick up where I left off and turn this into a more mainstream acceptable change rather than a one-off

Emby Server running inside OpenELEC - Voyl - 06-03-2016

I am having a try at it Wink