Compiling Kodi to make it have hardware decoding
-
- Posts: 47
- Joined: Thu Mar 28, 2019 7:10 am
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 7 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
hi, i already changed the default and desktop image has the sound through my speakers, its only when im in kodi that audio is switched to hdmi
edit: actually nevermind for now, seems running kodi like this is not as good as using corelec anyways, thanks for the help
edit: actually nevermind for now, seems running kodi like this is not as good as using corelec anyways, thanks for the help
- These users thanked the author everlasting for the post:
- alpe (Fri Oct 04, 2019 1:09 am)
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
@OverSun,
Can you please compare this output with yours?
The libcec4 package from Canonical might miss "AOCEC_API" option.
Can you please compare this output with yours?
Code: Select all
# cec-client -l
libCEC version: 4.0.4, git revision: libcec-4.0.4+1-ba9b538, compiled on Fri Aug 23 02:38:50 UTC 2019 by odroid@odroid on Linux 4.9.187-53 (aarch64),C
Found devices: 1
device: 1
com port: AOCEC
vendor id: 0000
product id: 0000
firmware version: 5
type: unknown
- OverSun
- Posts: 1491
- Joined: Mon Apr 29, 2013 5:12 pm
- languages_spoken: english
- Has thanked: 0
- Been thanked: 18 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
This is my output:
The problem is not the package, the problem is this:
As you can see in the output cec itself "works", and can even read the TV and data going back and forward (sometime, but not in this output for some reason), what it cannot do, - it cannot obtain client slot: "logical address 'Recorder 1' already taken" and so on up to 3.
CEC itself is a strictly limited system, it communicate on the bus where every device must have an id (like i2c thing), and there are 4 types of devices (cec-client -t option) each having 3 devices id to use. so basically there cannot be more than 12 devices on the bus.
The problem with current cec is whatever device id it is trying to assign - it's already taken by something, code always return that logic address is not available to request.
Also there is pretty strange boot log, but I'm not sure how invalid it is:
Code: Select all
root@n2:~# cec-client -l
libCEC version: 4.0.4, git revision: libcec-4.0.4+1-ba9b538, compiled on Wed Jul 10 10:17:25 UTC 2019 by root@localhost on Linux 4.9.182+ (aarch64), features: P8_USB, DRM, P8_detect, AOCEC
Found devices: 1
device: 1
com port: AOCEC
vendor id: 0000
product id: 0000
firmware version: 5
type: unknown
Code: Select all
root@n2:~# cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 4.0.4
no serial port given. trying autodetect:
path: /dev/aocec
com port: AOCEC
opening a connection to the CEC adapter...
DEBUG: [ 160] Broadcast (F): osd name set to 'Broadcast'
NOTICE: [ 160] connection opened
DEBUG: [ 160] << Broadcast (F) -> TV (0): POLL
TRAFFIC: [ 160] << f0
DEBUG: [ 160] processor thread started
DEBUG: [ 160] >> POLL sent
DEBUG: [ 160] TV (0): device status changed into 'present'
DEBUG: [ 160] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 160] << f0:8c
DEBUG: [ 1160] expected response not received (87: device vendor id)
TRAFFIC: [ 1161] << f0:8c
DEBUG: [ 2161] expected response not received (87: device vendor id)
NOTICE: [ 2161] registering new CEC client - v4.0.4
DEBUG: [ 2161] detecting logical address for type 'recording device'
DEBUG: [ 2161] trying logical address 'Recorder 1'
DEBUG: [ 2161] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2161] << 11
DEBUG: [ 2161] >> POLL sent
unable to open the device on port AOCEC
DEBUG: [ 2161] logical address 'Recorder 1' already taken
DEBUG: [ 2161] Recorder 1 (1): device status changed into 'present'
DEBUG: [ 2161] trying logical address 'Recorder 2'
DEBUG: [ 2161] << Recorder 2 (2) -> Recorder 2 (2): POLL
TRAFFIC: [ 2161] << 22
DEBUG: [ 2161] >> POLL sent
DEBUG: [ 2161] logical address 'Recorder 2' already taken
DEBUG: [ 2161] Recorder 2 (2): device status changed into 'present'
DEBUG: [ 2161] trying logical address 'Recorder 3'
DEBUG: [ 2161] << Recorder 3 (9) -> Recorder 3 (9): POLL
TRAFFIC: [ 2161] << 99
DEBUG: [ 2161] >> POLL sent
DEBUG: [ 2161] logical address 'Recorder 3' already taken
DEBUG: [ 2161] Recorder 3 (9): device status changed into 'present'
ERROR: [ 2161] AllocateLogicalAddresses - failed to allocate device '0', type 'recording device'
ERROR: [ 2161] failed to find a free logical address for the client
ERROR: [ 2161] failed to register the new CEC client - cannot allocate the requested device types
ERROR: [ 2161] failed to register a CEC client
DEBUG: [ 2161] unregistering all CEC clients
CEC itself is a strictly limited system, it communicate on the bus where every device must have an id (like i2c thing), and there are 4 types of devices (cec-client -t option) each having 3 devices id to use. so basically there cannot be more than 12 devices on the bus.
The problem with current cec is whatever device id it is trying to assign - it's already taken by something, code always return that logic address is not available to request.
Also there is pretty strange boot log, but I'm not sure how invalid it is:
Code: Select all
root@n2:~# journalctl --boot | grep -i cec
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cec driver date:Ver 2019/3/25
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cecb_ver:0x1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: line_reg:0x1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: line_bit:0x3
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: ee_to_ao:0x1
Jul 25 18:19:52 n2.local kernel: input: cec_input as /devices/virtual/input/input0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: not find 'port_num'
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: using cec:1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: no hdmirx regs
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: no hhi regs
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: not find 'output'
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: irq cnt:2
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: wakeup_reason:0x0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: aml_cec_probe success end
Aug 21 22:38:56 n2.local systemd-logind[3259]: Watching system buttons on /dev/input/event0 (cec_input)
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Thanks,
We will look into what you pointed more closely.
We will look into what you pointed more closely.
- OverSun
- Posts: 1491
- Joined: Mon Apr 29, 2013 5:12 pm
- languages_spoken: english
- Has thanked: 0
- Been thanked: 18 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Maybe something has changed since the very first upstream that I tried, but I do remember I've seen my TV in output of cec-client, and the problem was that all devices were occupied, but now I don't see any return from TV in cec-client, it very quickly goes through all ioctls and fails with no available device id found, but maybe that's just a side effect now of that every ioctl fail.
Anyways, this is seems to be somewhere between HDMI and CEC code, cec itself seems to be available, there are some dmesg, but the data doesn't reach userspace and maybe other way around as well.
Anyways, this is seems to be somewhere between HDMI and CEC code, cec itself seems to be available, there are some dmesg, but the data doesn't reach userspace and maybe other way around as well.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
This is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.odroid wrote: ↑Mon Aug 19, 2019 7:03 pmNo.. I was wrong.
You can run the Kodi on the latest Mate image.
Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.type and run "kodi" on the VT.Code: Select all
apt install mali-fbdev kodi aml-libs
Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
-
- Posts: 92
- Joined: Tue May 21, 2013 10:46 am
- languages_spoken: english
- ODROIDs: ODROID
- Has thanked: 0
- Been thanked: 10 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
@OverSun,
It seems to be caused by 'cec_func_config' not defined in the code below.
https://github.com/hardkernel/linux/blo ... 5038-L5072
https://github.com/hardkernel/linux/blo ... ec.c#L1774
add "hdmitx = cec3f" to the boot.ini file bootargs,
I checked on LG-TV, it works well.
It seems to be caused by 'cec_func_config' not defined in the code below.
https://github.com/hardkernel/linux/blo ... 5038-L5072
https://github.com/hardkernel/linux/blo ... ec.c#L1774
add "hdmitx = cec3f" to the boot.ini file bootargs,
I checked on LG-TV, it works well.
Can you check it?setenv bootargs "root=...... hdmitx=cec3f ......"
- OverSun
- Posts: 1491
- Joined: Mon Apr 29, 2013 5:12 pm
- languages_spoken: english
- Has thanked: 0
- Been thanked: 18 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
damn, I really wanted to test this old config from C2, I had the suspicion the code is just the old one taken from C2 kernel.
Last week was so hectic for me I was not able to do that, going to do that this evening. Thanks for reminding me the idea!
PS. Yes, it works! Confirmed.
Last week was so hectic for me I was not able to do that, going to do that this evening. Thanks for reminding me the idea!
PS. Yes, it works! Confirmed.
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Thank you for the confirmation. I've updated the WiKi page.
https://wiki.odroid.com/odroid-n2/os_im ... 90806#kodi
https://wiki.odroid.com/odroid-n2/os_im ... 90806#kodi
-
- Posts: 8
- Joined: Mon Aug 05, 2019 1:26 am
- languages_spoken: english
- Has thanked: 3 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Thanks I can confirm, cec is working again! H265 still not working in Kodi.
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I've tested a few different H.265 sample videos and they worked fine.
This heavy 60FPS 4K H.265 sample played smoothly.
SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv
http://4ksamples.com/ses-astra-uhd-test-1-2160p-uhdtv/
This heavy 60FPS 4K H.265 sample played smoothly.
SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv
http://4ksamples.com/ses-astra-uhd-test-1-2160p-uhdtv/
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I've used the Kodi on the latest Mate image over two weeks.dbod wrote: ↑Mon Aug 26, 2019 8:43 pmThis is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.odroid wrote: ↑Mon Aug 19, 2019 7:03 pmNo.. I was wrong.
You can run the Kodi on the latest Mate image.
Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.type and run "kodi" on the VT.Code: Select all
apt install mali-fbdev kodi aml-libs
Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
But Kodi 18.3 seems to be working on 1080p or 2160p monitor only.
What is your display native resolution?
- OverSun
- Posts: 1491
- Joined: Mon Apr 29, 2013 5:12 pm
- languages_spoken: english
- Has thanked: 0
- Been thanked: 18 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
H265 is also working for me. Not brilliantly reliable, rewind work bad, resume from a time point work bad and watching next H265 clip after one fails 50/50, which basically reflect amlogic quality code in general (H265 is waaaaaay more complicated to implement than H264), but in general this can be called "working".
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
It is a 4K TV, thus 3840 x 2160.odroid wrote: ↑Thu Aug 29, 2019 4:35 pmI've used the Kodi on the latest Mate image over two weeks.dbod wrote: ↑Mon Aug 26, 2019 8:43 pmThis is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.odroid wrote: ↑Mon Aug 19, 2019 7:03 pmNo.. I was wrong.
You can run the Kodi on the latest Mate image.
Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.type and run "kodi" on the VT.Code: Select all
apt install mali-fbdev kodi aml-libs
Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
But Kodi 18.3 seems to be working on 1080p or 2160p monitor only.
What is your display native resolution?
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I'm also using a 4K HDR TV. I set the 4K resolution on the Kodi display settings.
Can you take a picture of the
Can you take a picture of the
strange artifacts
?- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I have to say the Kodi reliability on Ubuntu is far worse than CoreELEC OS.OverSun wrote: ↑Thu Aug 29, 2019 4:58 pmH265 is also working for me. Not brilliantly reliable, rewind work bad, resume from a time point work bad and watching next H265 clip after one fails 50/50, which basically reflect amlogic quality code in general (H265 is waaaaaay more complicated to implement than H264), but in general this can be called "working".
When we played with CE for a few days, we felt it was almost consumer product level. Rewind, seek, pause and resume with 4K H265 videos worked fine on a recent CE nightly build.
So I consider using a multi-boot function with Ubuntu + CoreELEC via Petitboot since we don't know when the issues can be fixed.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
How can I share that picture with you easily? I don't have any pastebin, imgur or whatever accounts....
- mad_ady
- Posts: 6886
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1, H2, N2
- Location: Bucharest, Romania
- Has thanked: 245 times
- Been thanked: 181 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
imgur doesn't require an account to post an image.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding

You cannot see it but in the terminal below I started kodi with "sudo kodi". I hope it is something trivial that I am doing wrong.
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
As I described, you had to run Kodi on a VT.
"Press Ctrl-Alt-F3" and login with root/odroid on the VT.
viewtopic.php?f=177&t=34438&start=50#p266126
"Press Ctrl-Alt-F3" and login with root/odroid on the VT.
viewtopic.php?f=177&t=34438&start=50#p266126
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
My bad. I did not know about those virtual terminals yet. That's why I did not get the point. Now this explains the effects that saw see pretty well.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
When doing the cmake and the actual make there is a bug in the file env.h, where the git version inserted at line 92 (#define "LIB_INFO") contains a line break, which makes the compiler choke (at lease in my environment). Just join this and the following line and the make runs without any problems.odroid wrote: ↑Thu Aug 29, 2019 9:41 amThank you for the confirmation. I've updated the WiKi page.
https://wiki.odroid.com/odroid-n2/os_im ... 90806#kodi
But still no device is found:
Code: Select all
odroid ~ ❯❯❯ cec-client -l
libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic ... , features: P8_USB, DRM, P8_detect, randr
Found devices: NONE
odroid ~ ❯❯❯ cat /proc/cmdline
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw console=ttyS0,115200n8 no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=2160p60hz cvbsmode=576cvbs max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=hdmi disablehpd=false cvbscable= overscan=100 monitor_onoff=false
usb-xhci.tablesize=2 logo=osd0,loaded hdmitx=cec3f enable_wol=1
odroid ~ ❯❯❯
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Right. There must be something strange going on during the compilation.
It looks like cmake prepares things correctly:
Code: Select all
odroid ~/l/build ❯❯❯ cmake -DHAVE_AOCEC_API=1 .. master
-- git found: /home/pi/libcec/build/HEAD
libcec-4.0.4+1-ba9b538
CMake Deprecation Warning at /usr/share/cmake-3.10/Modules/UseSWIG.cmake:231 (message):
SWIG_ADD_MODULE is deprecated. Use SWIG_ADD_LIBRARY instead.
Call Stack (most recent call first):
src/libcec/cmake/CheckPlatformSupport.cmake:190 (swig_add_module)
src/libcec/CMakeLists.txt:134 (include)
-- Configured features:
-- Pulse-Eight CEC Adapter: yes
-- Pulse-Eight CEC Adapter detection: yes
-- xrandr support: yes
-- Raspberry Pi support: no
-- TDA995x support: no
-- Exynos support: no
-- DRM support: yes
-- AOCEC support: yes
-- Python support: version 3.6.8 (3.6)
-- lib info: git revision: /home/pi/libcec/build/HEAD
libcec-4.0.4+1-ba9b538, compiled on Mi 4. Sep 08:35:14 UTC 2019 by pi@odroid.fritz.box on Linux 4.9.187-53 (aarch64), features: P8_USB, DRM, P8_detect, randr, AOCEC
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/libcec/build
But after compiling and installing we have
Code: Select all
odroid ~ ❯❯❯ cec-client -l master
libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic ... , features: P8_USB, DRM, P8_detect, randr
Found devices: NONE
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Remove the canonical's libcec package and build/install the 4.0.4 source will solve the issue probably.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I guess. But for me this would mean too much messing around. You end up in states that you cannot (remember to) reproduce once you have to 

-
- Posts: 9
- Joined: Tue Jun 18, 2019 10:00 pm
- languages_spoken: english,spanish
- ODROIDs: N2
- Has thanked: 0
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I have compile and install libcec it this way:
Then you can install kodi with apt-get without problems and cec working.
On the other hand, kodi binary addons packages are broken (pvr addons at least). I have compiled some addons myself, but it would be great if they could fix them.
Code: Select all
cd ~
mkdir -p ~/ubuntu-packages/libcec-package
cd ~/ubuntu-packages/libcec-package
apt-get build-dep libcec4
apt-get source libcec4
cd libcec-4.0.2+dfsg1
vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line
debuild -us -uc
cd ~/ubuntu-packages/libcec4-packages
sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
On the other hand, kodi binary addons packages are broken (pvr addons at least). I have compiled some addons myself, but it would be great if they could fix them.
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
@gerulrich,
Thank you for sharing the instruction to fix the CEC problem.
We will consider making our own libcec and addon packages for easier life.
Thank you for sharing the instruction to fix the CEC problem.
We will consider making our own libcec and addon packages for easier life.
-
- Posts: 73
- Joined: Fri Apr 26, 2019 10:03 pm
- languages_spoken: english
- ODROIDs: N2
- Has thanked: 4 times
- Been thanked: 1 time
- Contact:
-
- Posts: 9
- Joined: Tue Jun 18, 2019 10:00 pm
- languages_spoken: english,spanish
- ODROIDs: N2
- Has thanked: 0
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Another thing, I put a hold in the libcec4 and cec-utils packages to avoid updating with the repository version that does not have AOCEC enabled:
Code: Select all
sudo apt-mark hold libcec4
sudo apt-mark hold cec-utils
-
- Posts: 85
- Joined: Tue May 14, 2019 10:18 pm
- languages_spoken: Turkish
- ODROIDs: ODROID N2
- Has thanked: 26 times
- Been thanked: 2 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I installed Kodi, it worked fine. Thank you.
I have a problem, I installed a Turkish language pack. Now I just see the Kodi font and the blue strips, I can't see anything else. what should I do? I can't get into the settings because I don't see them.
I have a problem, I installed a Turkish language pack. Now I just see the Kodi font and the blue strips, I can't see anything else. what should I do? I can't get into the settings because I don't see them.
- memeka
- Posts: 4398
- Joined: Mon May 20, 2013 10:22 am
- languages_spoken: english
- ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART - Has thanked: 1 time
- Been thanked: 45 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
delete ~/.kodi
- These users thanked the author memeka for the post:
- istanbulls (Sat Sep 14, 2019 10:17 pm)
Images: U2/U3 Trusty Dev Center | XU Trusty Dev Center | XU4 Hipster Stretchy Pants
Information: U2/U3 Dashboard | XU Dashboard
Say thank you with a beer
Information: U2/U3 Dashboard | XU Dashboard
Say thank you with a beer
-
- Posts: 85
- Joined: Tue May 14, 2019 10:18 pm
- languages_spoken: Turkish
- ODROIDs: ODROID N2
- Has thanked: 26 times
- Been thanked: 2 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
thank you for your help.
"delete ~ / .kodi" command does not work
-
- Posts: 9
- Joined: Tue Jun 18, 2019 10:00 pm
- languages_spoken: english,spanish
- ODROIDs: N2
- Has thanked: 0
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
The command is
Enviado desde mi Redmi Note 4 mediante Tapatalk
Code: Select all
rm -r ~/.kodi
Enviado desde mi Redmi Note 4 mediante Tapatalk
Last edited by gerulrich on Sun Sep 15, 2019 5:22 am, edited 1 time in total.
-
- Posts: 85
- Joined: Tue May 14, 2019 10:18 pm
- languages_spoken: Turkish
- ODROIDs: ODROID N2
- Has thanked: 26 times
- Been thanked: 2 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I have two different edit, which is most accurate?



-
- Posts: 75
- Joined: Sat Apr 12, 2014 1:21 pm
- languages_spoken: portuguese, english
- ODROIDs: C1, N2 4GB
- Location: Rio de Janeiro, Brazil
- Has thanked: 15 times
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
While I wait for my board I'm doing some research.
How to install Kodi on Ubuntu minimal?
Acceleration works on minimal?
How can I open Kodi automatically on boot? Rc.local?
Thanks.
How to install Kodi on Ubuntu minimal?
Acceleration works on minimal?
How can I open Kodi automatically on boot? Rc.local?
Thanks.
-
- Posts: 9
- Joined: Tue Jun 18, 2019 10:00 pm
- languages_spoken: english,spanish
- ODROIDs: N2
- Has thanked: 0
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
if you need cec working with kodi do the following:
Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.
Code: Select all
sudo apt-get update
mkdir -p ~/ubuntu-packages/libcec-package
cd ~/ubuntu-packages/libcec-package
apt-get build-dep libcec4
apt-get source libcec4
cd libcec-4.0.2+dfsg1
# edit debian/rules
vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save
debuild -us -uc
cd ~/ubuntu-packages/libcec-package
sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
sudo apt-mark hold libcec4
sudo apt-mark hold cec-utils
Code: Select all
apt-get install kodi aml-libs
Code: Select all
[Unit]
Description=Kodi
After=network.target
[Service]
Type=simple
# Another Type: forking
User=kodi
WorkingDirectory=/home/kodi
ExecStart=/usr/bin/kodi-standalone
Restart=on-failure
# Other restart options: always, on-abort, etc
# The install section is needed to use
# `systemctl enable` to start on boot
# For a user service that you want to enable
# and start automatically, use `default.target`
# For system level services, use `multi-user.target`
[Install]
WantedBy=multi-user.target
Code: Select all
systemctl daemon-reload
systemctl start kodi
systemctl enable kodi
-
- Posts: 75
- Joined: Sat Apr 12, 2014 1:21 pm
- languages_spoken: portuguese, english
- ODROIDs: C1, N2 4GB
- Location: Rio de Janeiro, Brazil
- Has thanked: 15 times
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Thanks. Should work on Armbian as well, right?gerulrich wrote: ↑Fri Oct 04, 2019 1:21 am
if you need cec working with kodi do the following:
Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.
after that you can install kodi with:Code: Select all
sudo apt-get update mkdir -p ~/ubuntu-packages/libcec-package cd ~/ubuntu-packages/libcec-package apt-get build-dep libcec4 apt-get source libcec4 cd libcec-4.0.2+dfsg1 # edit debian/rules vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save debuild -us -uc cd ~/ubuntu-packages/libcec-package sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb sudo apt-mark hold libcec4 sudo apt-mark hold cec-utils
Add a service file for kodi: /etc/systemd/system/kodi.serviceCode: Select all
apt-get install kodi aml-libs
I use kodi as user, but you can use whatever you want. You must verify that the user has the required permissions.Code: Select all
[Unit] Description=Kodi After=network.target [Service] Type=simple # Another Type: forking User=kodi WorkingDirectory=/home/kodi ExecStart=/usr/bin/kodi-standalone Restart=on-failure # Other restart options: always, on-abort, etc # The install section is needed to use # `systemctl enable` to start on boot # For a user service that you want to enable # and start automatically, use `default.target` # For system level services, use `multi-user.target` [Install] WantedBy=multi-user.target
that's all i thinkCode: Select all
systemctl daemon-reload systemctl start kodi systemctl enable kodi
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Probably not since they have supported GPU/VPU driver packages very rarely.
-
- Posts: 75
- Joined: Sat Apr 12, 2014 1:21 pm
- languages_spoken: portuguese, english
- ODROIDs: C1, N2 4GB
- Location: Rio de Janeiro, Brazil
- Has thanked: 15 times
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
:/
TBH I think the only think I would miss without armbian on the N2 is the use of zram for logs and /tmp.
Think I'll just look into how to do the same. StuartIanNaylor/zram-config should do it.
-
- Posts: 25
- Joined: Tue Jan 13, 2015 10:06 am
- languages_spoken: english
- ODROIDs: XU3 - Lite
- Has thanked: 0
- Been thanked: 0
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Will Ubuntu Kodi work on a 720p TV or is that resolution too low?
- odroid
- Site Admin
- Posts: 32718
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Has thanked: 217 times
- Been thanked: 367 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
We didn't try 720p mode but it seems to be support 1080p and 2160p only.
Please try it if you don't mind.
Please try it if you don't mind.
-
- Posts: 25
- Joined: Tue Jan 13, 2015 10:06 am
- languages_spoken: english
- ODROIDs: XU3 - Lite
- Has thanked: 0
- Been thanked: 0
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I tried minimal install and res seemed to indicate 540 X ? . I was not able to change it from that setting and picture quality was terrible. Coreelec works great at 720p but it would be good to have a web browser.
Edit: probably a stupid question but why does Coreelec support 720p but not Linux. I assume this is a software issue not the N-2s hardware
Edit: probably a stupid question but why does Coreelec support 720p but not Linux. I assume this is a software issue not the N-2s hardware
-
- Posts: 1589
- Joined: Tue Sep 01, 2015 8:54 am
- languages_spoken: english
- ODROIDs: XU4, N1, N2
- Has thanked: 25 times
- Been thanked: 75 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
Coreelec is Linux Distrobution like Ubuntu etc; except it has fewer official packages, some kernel + driver modifications, and kodi instead of a desktop.
-
- Posts: 25
- Joined: Tue Jan 13, 2015 10:06 am
- languages_spoken: english
- ODROIDs: XU3 - Lite
- Has thanked: 0
- Been thanked: 0
- Contact:
Re: Compiling Kodi to make it have hardware decoding
@ elatllat
You seem to have reworded and parsed my statement so it doesn't make sense.
The point I was making is Coreelec supports 720p on the Odroid N-2 but Ubuntu does not. This sounds like a limitation of the Ubuntu version for Odroid. Could this or will this be fixed. I noticed someone else raised the matter in an earlier post on this thread and was ignored
You seem to have reworded and parsed my statement so it doesn't make sense.
The point I was making is Coreelec supports 720p on the Odroid N-2 but Ubuntu does not. This sounds like a limitation of the Ubuntu version for Odroid. Could this or will this be fixed. I noticed someone else raised the matter in an earlier post on this thread and was ignored
-
- Posts: 75
- Joined: Sat Apr 12, 2014 1:21 pm
- languages_spoken: portuguese, english
- ODROIDs: C1, N2 4GB
- Location: Rio de Janeiro, Brazil
- Has thanked: 15 times
- Been thanked: 5 times
- Contact:
Re: Compiling Kodi to make it have hardware decoding
I had to create the user Kodi manually with:gerulrich wrote: ↑Fri Oct 04, 2019 1:21 am
if you need cec working with kodi do the following:
Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.
after that you can install kodi with:Code: Select all
sudo apt-get update mkdir -p ~/ubuntu-packages/libcec-package cd ~/ubuntu-packages/libcec-package apt-get build-dep libcec4 apt-get source libcec4 cd libcec-4.0.2+dfsg1 # edit debian/rules vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save debuild -us -uc cd ~/ubuntu-packages/libcec-package sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb sudo apt-mark hold libcec4 sudo apt-mark hold cec-utils
Add a service file for kodi: /etc/systemd/system/kodi.serviceCode: Select all
apt-get install kodi aml-libs
I use kodi as user, but you can use whatever you want. You must verify that the user has the required permissions.Code: Select all
[Unit] Description=Kodi After=network.target [Service] Type=simple # Another Type: forking User=kodi WorkingDirectory=/home/kodi ExecStart=/usr/bin/kodi-standalone Restart=on-failure # Other restart options: always, on-abort, etc # The install section is needed to use # `systemctl enable` to start on boot # For a user service that you want to enable # and start automatically, use `default.target` # For system level services, use `multi-user.target` [Install] WantedBy=multi-user.target
that's all i thinkCode: Select all
systemctl daemon-reload systemctl start kodi systemctl enable kodi
Code: Select all
sudo adduser --disabled-password --disabled-login kodi
as suggested in other post.sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev kodi
Who is online
Users browsing this forum: No registered users and 1 guest