Jump to content
kayrus

Emby Docker image for ARM (armhf arch) mini computers (Raspeberry Pi2, Cubietruck, Odroid, etc.)

Recommended Posts

kayrus

I didn't find any correct Dockerfile or instructions on how to install Emby on top of armhf architecture so I had to combine some of them and as a result here is working Emby Docker image - https://hub.docker.com/r/kayrus/emby/

 

I've tested it on my Cubietruck with Debian Wheezy and Linux kernel which supports Docker (>=3.6). For example Armbian for Cubietruck has Linux kernel v4.2.3. In any case even if you don't have Docker you can try to install Emby just following Dockerfile manually.

 

What doesn't work: direct play for all my h.264 MKV videos using web browser (for example direct play of the same videos works perfectly on Plex - https://hub.docker.com/r/kayrus/plex/). I don't know how can I force Emby to disable transcoding for MKV, but it works and it is really slow. Direct play of the h.264 inside the MP4 container works fine.

 

Details on this image: I had to cross-compile ffmpeg, libvidstab1.0 and libx265-59 packages from this PPA repo: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/+packages. These packages are available inside the image in /tmp/deb directory. You can compile them yourself using armv7/armhf-ubuntu:14.04.3 Docker image if you wish. Here are basic instructions:

Enable multiverse repo:
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse

apt-get install build-essential autoconf libasound2-dev libass-dev libbz2-dev libfdk-aac-dev libfreetype6-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev libpulse-dev libsdl1.2-dev libsoxr-dev libspeex-dev libtheora-dev libva-dev libvdpau-dev libvo-aacenc-dev libvorbis-dev libx11-dev libx264-dev libxext-dev libxfixes-dev libxcb-shm0-dev libxcb-xfixes0-dev libxvidcore-dev libxvmc-dev texi2html zlib1g-dev cmake python-sphinx debhelper libgsm1-dev libiec61883-dev libavc1394-dev libjack-jackd2-dev liblzma-dev libmodplug-dev libopenal-dev libopenjpeg-dev librtmp-dev libschroedinger-dev libsctp-dev libshine-dev libsnappy-dev libtwolame-dev libvo-amrwbenc-dev libvpx-dev libwavpack-dev libwebp-dev libzmq3-dev libzvbi-dev texinfo yasm cleancss doxygen node-less

Build instructions:
* dpkg-sorce -x package_name.dsc
* cd package_name && dpkg-buildpackage -b
* install missed dependencies if necessary

build x265 package from wily sources:
http://packages.ubuntu.com/wily/x265

build libstab from https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/+packages sources:
https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/+sourcepub/5273238/+listing-archive-extra

dpkg -i libx265-dev_1.7-4_armhf.deb libx265-59_1.7-4_armhf.deb libvidstab1.0_1.0~trusty1.3_armhf.deb libvidstab-dev_1.0~trusty1.3_armhf.deb

Then download ffmpeg and compile:
https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/+sourcepub/5734739/+listing-archive-extra

Install packages:
dpkg -i libx265-59_1.7-4_armhf.deb libvidstab1.0_1.0~trusty1.3_armhf.deb ffmpeg_2.8.3+git1~trusty1_armhf.deb || apt-get install -fy

Image size is approximately 315Mb. Mono takes lot of space.

 

You can also find example Systemd unit file on image description page.

Edited by kayrus

Share this post


Link to post
Share on other sites
hurricanehrndz

Thanks for your feedback, I'm actually currently working on the docker image for arm. It was going to be an XMAS gift. Anyhow  Thank you for the info. May I ask why your including the x265 if your hoping to get direct play? 

Share this post


Link to post
Share on other sites
kayrus

Thanks for your feedback, I'm actually currently working on the docker image for arm. It was going to be an XMAS gift. Anyhow  Thank you for the info. May I ask why your including the x265 if your hoping to get direct play? 

I didn't modify existing ffmpeg package from mc3man's repo. And it requires x256 and vidstab libs. Anyhow if you wish I can cross-compile original ffmpeg package from the Ubuntu Xenial repo (http://packages.ubuntu.com/xenial/ffmpeg). It will require some modifications because there are some dependency problems.

 

BTW: Are you working on MKV direct play implementation? Are there any problems with it? Why Plex can do that but Emby not? Is there a github issue created?

Edited by kayrus

Share this post


Link to post
Share on other sites
hurricanehrndz

Thanks. I don't think I will be using a debian distro for the arm docker. I was thinking of using openSUSE tumbleweed, ffmpeg is already available and our packages are being package for SUSE now too. https://build.opensuse.org/package/show/openSUSE:Factory:ARM/ffmpeg

 

Nope, that's web development. There is a way to get the web interface to launch an external player that supports direct paly.

Edited by hurricanehrndz

Share this post


Link to post
Share on other sites
kayrus

Thanks. I don't think I will be using a debian distro for the arm docker. I was thinking of using openSUSE tumbleweed, ffmpeg is already available and our packages are being package for SUSE now too. https://build.opensuse.org/package/show/openSUSE:Factory:ARM/ffmpeg

 

Nope, that's web development. There is a way to get the web interface to launch an external player that supports direct paly.

Hm. Looks like there is no openSUSE armhf Docker base image. I'll try to build one later.

 

As for the direct play - I don't want to use external player. I'd like to use only the browser. Plex somehow converts MKV into MP4 on-the-fly and it is possible to watch MKV videos directly in the browser. ffmpeg can convert containers without any problems:

ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4 # in some cases -movflags +faststart  should help

So there should be a possibility to transform containers on-the-fly.

Edited by kayrus

Share this post


Link to post
Share on other sites
hurricanehrndz

It's there it has just been disabled. There has been many discussions on disabling transcoding. Please run search.

 

Sent from my D6603 using Tapatalk

Share this post


Link to post
Share on other sites
kayrus

It's there it has just been disabled. There has been many discussions on disabling transcoding. Please run search.

 

Sent from my D6603 using Tapatalk

I've already googled and didn't find any doc on how can I set direct play profile for the web client / web browser. I can only see profiles on DNLA configuration page. But even there when I set all codecs and all container for direct play it doesn't work. Did I miss something?

Edited by kayrus

Share this post


Link to post
Share on other sites
kayrus

I would also post a question here:

http://emby.media/community/index.php?/topic/16767-mediabrowser-server-on-my-arm-based-beloved-cubox-i/page-2

 

That user has been running on ARM the longest. He is probably the most knowledgeable individual regarding your issue.

The links you provided don't contain any proper information. I suppose it doesn't matter on which platform you run Emby. Web interface should be the same for all platforms. The main problem - there are lots of topics about forcing direct play and no solution at all even on official wiki page. Probably you can try to set up direct play through the web browser for mkv yourself and provide me with the instructions. 

Edited by kayrus

Share this post


Link to post
Share on other sites
hurricanehrndz

Perhaps, I will put on my list of things to do.

 

Sent from my D6603 using Tapatalk

Share this post


Link to post
Share on other sites
kayrus

I've backported ffmpeg v2.8.3 and x264 v1.8 packages from ubuntu xenial to ubuntu trusty armhf. Let me know if someone needs binaries.

Share this post


Link to post
Share on other sites
hurricanehrndz

Kayrus,

 

I'm doing a static build of ffmpeg, care to try it?

Share this post


Link to post
Share on other sites
kayrus

Do you mean huge binary with statically linked libs? I guess it is already done by porting mc3man package.

Share this post


Link to post
Share on other sites
hurricanehrndz

 Is the mc3man package static? It always brings down so many other libraries though when installing, doesn't it?

Share this post


Link to post
Share on other sites
kayrus

Not so many as default Ubuntu official ffmpeg package.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...