[HOWTO]: Emby Server with hardware transcoding in XU4/HC1/HC2 Armbian Stretch


Recommended Posts

As a result of all the work that Armbian developers put into the upgrade to kernel 4.14 for the XU4 board family, now we can enjoy many new features. One of them is the access to the SoC video encoding capabilities.

 

Emby Media Server can take advantage of the Exynos 5422 MFC video engine for transcoding. That means lower CPU usage, lower temperatures, and the possibility of encoding in real time higher resolutions or more simultaneous streams. In my tests, I've been able to transcode one HEVC 1080p and one 480p at the same time, or five 480p (though it will depend on the bitrate of the source material).

 

However, the ffmpeg version shipped with official Emby is quite unstable when using this feature. For that reason, I compiled a better and more stable version from @memeka's repo. I've been using it for over a month without a single crash.

 

So this is a step-by step guide on how to make everything work:

 

0. [PREREQUISITE]: You must be running an Armbian Strech XU4 "Next" image, like the one you can download here.

 

  1. >> DOWNLOAD the emby and ffmpeg packages from this link <<
  2. Install them (Note: this will install Emby Server version 3.5.3, which is the last at the writing of this tutorial. It has been tested to work with this version, and may or may not work with any other):
    $ tar xvf emby-server-stretch-xu4_1.0.tar.xz
    $ sudo dpkg -i ffmpeg/*.deb
    $ sudo dpkg -i emby-server/*.deb
    $ sudo apt -f install

     

  3. Hold the ffmpeg packages, so they don't get upgraded:  

    $ sudo apt-mark hold ffmpeg-doc ffmpeg libavcodec-dev libavcodec-extra libavdevice-dev libavfilter-dev libavfilter-extra libavformat-dev libavresample-dev libavutil-dev libmysofa-dev libmysofa-utils libmysofa0 libpostproc-dev libswresample-dev libswscale-dev

     

  4. Add the user "emby" to the video group, so it can have access to the transcoding engine:
    $ sudo usermod -aG video emby

     

  5. Modify the emby executable, to use our custom ffmpeg (Note: you will need to repeat this step every time you update the emby deb package):
    $ sudo nano /opt/emby-server/bin/emby-server
    
    # Change the following line:
    
    ffmpeg $APP_DIR/bin/ffmpeg \
    
    # to:
    
    ffmpeg /usr/bin/ffmpeg \

     

  6. Restart the service:

    $ sudo service emby-server restart

     

  7. Now, you can open the web browser, point to your Emby server (e.g. http://odroidxu4.local:8096), and configure it as described in the official tutorial (https://github.com/MediaBrowser/Wiki/wiki/Installation).

  8. For last, you need to enable Hardware video transcoding in the web interface. The option is under the "Transcoding" submenu. Don't forget to click on "Save" when you are done:743001677_2018-08-2917_32_32-Transcoding.thumb.png.4ff3b4db527d9b0a318b327e9afca184.png

 

 

1122350758_2018-08-2917_32_45-Transcoding.thumb.png.3fe655aadc8dcc6ea6af274e33860545.png

 

And that's it!

 

As an additional tip, I recommend disabling UPnP in Emby, because it causes the program to crash frequently when enabled (this is just a general recommendation, it has nothing to do with hardware encoding).

 

Enjoy! And please, share your experiences and comments here.

Link to post
Share on other sites
Donate and support the project!

Hi sir;

 

I know that this topic is closed long ago but I think this is one of a kind.

 

I bought a Odroid XU4 with the expectation to use Emby at least for hardware transcoding for my HVEC 1080p movies...  I am trying to follow you guide above but I am not finding the armbian image you mentioned. Everything else is working dough.

 

Do you have another link for that image. Or do you have another ffmpeg that uses the buster armbian with kernel 4.14?

 

 

Thanks!!!!

Link to post
Share on other sites
On 6/10/2020 at 7:27 PM, alexjcgdf said:

Hi sir;

 

I know that this topic is closed long ago but I think this is one of a kind.

 

I bought a Odroid XU4 with the expectation to use Emby at least for hardware transcoding for my HVEC 1080p movies...  I am trying to follow you guide above but I am not finding the armbian image you mentioned. Everything else is working dough.

 

Do you have another link for that image. Or do you have another ffmpeg that uses the buster armbian with kernel 4.14?

 

 

Thanks!!!!

 

Or maybe, if you could give the parameters you use to compile your own FFMPEG for Odroid XU4. TOday I am using the last Emby (I tryed to use yours but the client apps doesnt support that server anymore :( ). 

 

So today I have a 4.5 emby server and my XU4 is using armbian Buster Minimal with Kernel 5.4 stable.

 

Anything would be a great help!!!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...