Jump to content

How to install on Pine64 with VA-API support ( arch : arm64 )


Recommended Posts

Posted (edited)
I try find a good media server. I try plex and found it take allot of cpu power on ARM 
Almost all media was transcode and it did not have power todo transcode in most case.
 
So I did want try another media server. I did find emby server.
Most of Pine64 images are build with ARM64 support only. 
But emby server are build with arm32 bits support with hardware float point :( (armhf)
 
After some exprement and I document step for step how to install it. 
 
Do not forget activate the VA acclartion in the web config after you follow this guide
how to get it. 
 
 
 
 

Choice Ubunutu 16.04 base from longsteep
after burn the image to the memory card and put it in pine64 and boot it
 
in /usr/local/sbin/ u will find 3 script you need to run
 
1. run uboot update 
2. run linux kernel update
3. run resize 
4. reboot
 
After we reboot we got hardware acclartions of video in mpeg 1-2, h264, vc1, h265 
with ffmpeg script found in /usr/local/sbin
 
 
Now we need add 32bits arm support for our ubunut 
dpkg --add-architecture armhf
 
apt update
apt upgrade
 
After this command line we can run armhf on arm64 
apt install binfmt-support
 
test see if we got armhf support now
apt install traceroute:armhf
traceroute
 
if traceroute fail to run, you arm cpu are not backword compatible with arm32. 
But A64 are backword compatible, if it should  fail. check see if bmt misc service is running
if not start it and try again. in worst case do a reboot. and try again.
 
 
Now we come to how to install emby server 
emby server is writen in dotnet so it need mono to run it.
Ubuntu 16.04 comes with a outdated mono that can not run lates version of
emby server. So we need update manual to lates version of mono
 
we also need mplayer and ffmpeg for emby server
 
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
apt install apt-transport-https
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
 
apt install mplayer ffmpeg mono-complete zlib1g:armhf 
 
 
Now we can follow emby website guide 
side note  Depends: libc6 (>= 2.22), zlib1g (>= 1:1.1.4)
 
dpkg -i emby-server-deb_3.5.2.0_armhf.deb
 
systemctl stop emby-server
 
add this two line to etc/emby.config
PATH=/usr/bin:$PATH
export VDPAU_DRIVER=sunxi
 
after u done that 
systemctl start emby-server
 
add user emby to your media group
usermod -a -G media emby
 
 
If you want to change ffmpeg version
edit 
/opt/emby-server/bin/emby-server
 
after you have change the ffmpeg version to 64 bits / I did change to /usr/bin/ffmpeg (64bits version instead for 32bits version) it give better perfoments
 
systemctl stop emby-server
systemctl start emby-server
Edited by GreatLord
clarkss12
Posted

You are just running it as a server and not a client on that machine are you??

Posted

FYI:

 

This package:

https://github.com/MediaBrowser/Emby.Releases/releases/download/3.5.2.0/emby-server-deb_3.5.2.0_armhf.deb

Does NOT require you to install  mono or ffmpeg. It is completely standalone.

Posted

Yes I am running it as server.

Posted (edited)

it require 64 bits arm64 version of mono and ffmpeg 

the  emby-server-deb_3.5.2.0_armhf.deb is for armhf (32bits arm support)

all library and ffmpeg it comes with is compile for armhf (arm 32bits) 

 

Pine64 linux dist comes only with ARM64 (64bits ) not armhf (32 bits).

You are force adding backword compatible with arm 32bits. 

 

I you try install the emby-server-deb_3.5.2.0_armhf.deb it will compain missing mono for arm 64bits and some arm 32 bits libs

 

and this guide is step by step show how todo it.

Edited by GreatLord
Posted

Sorry that is not true, not the mono part at least. This package:

emby-server-deb_3.5.2.0_armhf.deb

will never complain about missing mono. 

Posted

the mono part that comes with it is compile for armhf not arm64 that is the issue here. 

it reufse to run on arm64 for me. 

 

Pine64 linux dist I am using and arch is arm64 not armhf

pine64:~$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial
 
pine64:~$ uname -a
Linux pine64 3.10.105-0-pine64-longsleep #3 SMP PREEMPT Sat Mar 11 16:05:53 CET 2017 aarch64 aarch64 aarch64 GNU/Linux
Posted

Right, it's not an arm64 package, so it shouldn't run on arm64.

Posted

Pine64 A64 arm cpu are backword compatible with arm32 bits 

with this guide you can make Emby-server work under pine64 distro with va-api for ffmpeg.

 

 

I hope this will help all other that want Emby-server work on a arm64 linux distro 

 

but it exists arm64 cpu that does not support arm32 at all. 

What I known is broadcom cpu for rasberry pi and Cortex A53 cpu for pine64 is backword compatible with arm32 bits instructions.

that why I was manger to get Emby-server working on arm64 and bit luck

 

Posted

Thanks for the info.

Posted

I did miss one thing in my guide and discover today

 

 

the Group Emby are not create as defualt 

you need manual create it and add user emby to it.

Posted

Optimze tips for Pine64

 

The media scan is slow on Pine64 

I and some time the image did not come up so fast, but faster that plex. 

I was thinking why not move the hole folder of metadata to my 7TB usb hardrive with raid 5 

 

systemctrl stop emby-server

 

move the emby metadata to my drive

mv /var/lib/emby/metadata /mnt/usb/linux/emby/metadata 

 

create symblic link

ls /var/lib/emby/metadata

 

systemctrl start emby-server

 

it solv my slov some of my media library scan issue and and slow devliver of images to the client

Posted

Great info, thanks !

  • 4 weeks later...
Posted

It have  working great, but sad is the video encoding power in the pine64, it is better that raspbery pi. 

I have change from PIne64 to RockPro64 (pine64.org) and runing debain with same guide I wrote here. 

 

RockPro64 does have armhf image with debain as well but I did choice arm64 image.

No lag at scaning library, better hardware encoder and decoders (opensource from rockchip) 6core with 4GB ram

 

I can do more that 1 transcoding (least 2 transcoding same time I have not try doing more that 2 stream at time with transcoding with libary scan)

Posted

Thanks for the info. At some point we will definitely roll out native arm64 images.

  • 2 months later...
Posted (edited)

Thanks for the info. At some point we will definitely roll out native arm64 images.

 

Is there a time schedule?

 

I'm thinking of getting a RockPro64. I would probably use OpenMediaVault. Emby is used on OMV via Docker.

Edited by 27k

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...