Kodi Community Forum

Full Version: ODC1 - AMlogic S805 am-h265 playback not possible
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm not sure if this is a HardKernel / Android / AMlogic Firmware issue or a Kodi Isengard issue.

Any help appreciated Smile

I'm unable to get anywhere near reliable playback of H265 content with an ODROID-C1 (S805) and H265 video files using hardware am-h265 decoding when using Kodi Isengard.
Across a multitude of h265 files, playback will either stop dead or if restarted - default to ff-hevc software decoding.
Once ff-hevc software decoding has taken place, I never see am-h265 hardware decoding every again.

Nearly always h265 playback defaults to ff-hevc decoding. (SPMC 14.2.0 was a tiny bit more reliable)
The Android app MX player plays all these H265 files properly using Amlogic hardware decoding when using the External Player function within Kodi, but only from a directly connected HDD.

As a side not - the same h265 files play reliably using am-h265, every time when using Kodi / Lubuntu 14.04 on this platform.

Debug Log:
https://dl.dropboxusercontent.com/u/2764...C1.log.txt

HEVC Test Files:
https://dl.dropboxusercontent.com/u/2764...2.HEVC.mkv
https://dl.dropboxusercontent.com/u/2764...-cfg02.mkv
I think it's your product's firmware hasn't grant the necessary permissions to XBMC/Kodi.

Need the manufacturer to fix it.
That was the case with Kodi 14.x Helix or SPMC 14.2.0.
The app SuperSu would receive permission requests and you could then grant and remember them so everything worked properly with rooted Firmware.

Kodi 15.x Isengard fixed this permissions problem with AMlogic SoC's and this is seen by no SuperSu permissions requests when running Isengard.
(2015-07-05, 10:47)wrxtasy Wrote: [ -> ]That was the case with Kodi 14.x Helix or SPMC 14.2.0.
The app SuperSu would receive permission requests and you could then grant and remember them so everything worked properly with rooted Firmware.

Kodi 15.x Isengard fixed this permissions problem with AMlogic SoC's and this is seen by no SuperSu permissions requests when running Isengard.

Maybe it's not "fixed" 100%, I'm not sure.
This is a guess on my part, but maybe h.265 is more reliable on amcodec, and firmware that needs permissions fixing will stop using amcodec and use mediacodec instead. Manually fixing the permissions and then trying with Isengard should show us if that is the issue. A workaround for firmware that don't have the permissions set correctly might be to set up some app that, by itself, sets these permissions upon boot.
Cheers Ned but I believe I've already looked into this permissions issue and even manually set the correct permissions to the required files. I do have amcodec selected too.
The strange thing is amc-h265 Hardware decoding sometimes works after a reboot for say 1 HEVC file then chokes on the next HEVC 1080p file. Its mostly unreliable.

I should also see the app SuperSu issue a Popup if any extra Kodi Isengard permissions requests are issued. This does not occur on Isengard like it used to with Helix.

I thought Kodi Isengard fixed this AMlogic permissions issue ?

If anyone has a list I can compare of what Video file permissions are requested by Kodi on AMlogic Hardware I can see if I'm missing something.
Nothing was fixed, Kodi just doesn't try to manually fix the permissions anymore. It was a hack that the devs didn't feel comfortable with, and venders need to fix this on the firmware level, not the app level. It's actually far less secure to allow a program to set permissions than it is to have amlogic decoding open to all apps. I don't think there's any security issue, but some venders are just unwilling to set the necessary permissions.

However, the mediacodec "path" to decoding doesn't require the permissions changes, and mediacodec support has improved both in Kodi and in most firmware (even in some of the flawed ones). So now when amcodec fails it falls back on mediacodec, which normally works. In that sense it is "fixed". Eventually mediacodec will be the single standard, but every so often something still plays better with amcodec directly, rather than using the mediacodec API.

I'll try finding the list of files that Kodi tried to change in v14.
(2015-07-05, 20:31)wrxtasy Wrote: [ -> ]Cheers Ned but I believe I've already looked into this permissions issue and even manually set the correct permissions to the required files. I do have amcodec selected too.
The strange thing is amc-h265 Hardware decoding sometimes works after a reboot for say 1 HEVC file then chokes on the next HEVC 1080p file. Its mostly unreliable.

That probably points to a deinitialization issue, where the h/w hevc decoder gets stuck.
When it works, please confirm (with the codec overlay) that "am-h265" is used. If it works once, it should always work.
Hi Koying, yes I can confirm when hevc decoding actually works I do get the dc:am-h265 from the Codec overlay
So Hardware decoding does actually work at least initially.

@ned > BTW I don't think I've seen Mediacodec ever decode even if selected (see Log), what should I see in the Codec overlay ?

These are the permissions requests I get from SuperSu when Kodi 14.0 Helix/SPMC starts:

Code:
chmod 666 /dev/amvideo
chmod 666 /dev/amstream_vbuf
chmod 666 /dev/amstream_hevc
chmod 666 /dev/amstream_mpps
chmod 666 /dev/amstream_mpts
chmod 666 /dev/amstream_rm
chmod 666 /dev/amstream_sub
chmod 666 /dev/amstream_sub_read
chmod 666 /dev/amstream_userdata
chmod 666 /dev/amstream_vbuf

chmod 666 /sys/class/video/axis
chmod 666 /sys/class/video/screen_mode
chmod 666 /sys/class/video/disable_video
chmod 666 /sys/class/tsync/pts_pcrscr
chmod 666 /sys/class/audiodsp/digital_raw
chmod 666 /sys/class/ppmgr/ppmgr_3d_mode
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

And of course the one used to allow refresh rate switching:
Code:
chmod 666 /sys/class/display/mode
In the codecinfo window it is confusing. It's something like "amc" for Android Media Codec, which is easy to confuse with amcodec for amlogic.
Yes it is bloody confusing. Especially for troubleshooting, who's bright idea was that, AMlogic ?

I'm actually getting somewhere now, disabled everything but Mediacodec hardware acceleration and now every 720p HEVC file play reliably (dc:amc-h265 shown) but chokes and defaults to ff-hevc for 1080p HEVC files.

Once ff-hevc happens you cannot even play those same 720p HEVC files with amc-h265 again.
As Koying said likely a deinitialization issue, how can this be fixed ?
Hard to tell. A single logcat of a session with a working one followed by a failed one might show revealing system messages...
Is this just a normal Kodi log do I need to tweak something, what log options do you suggest ?
I can cross reference with Kernel dmesg output as well.
I think he means this: logcat (wiki)
Ok Logcat here:
https://dl.dropboxusercontent.com/u/2764...Issues.txt

Hardware acceleration config:

amcodec - disable
libstagefright - enable
MediaCodec - enable

Relevant Time points:

23:53:52.487 - Successful 720 HEVC playback using amc-h265
23:54:06.597 - Unsuccessful 1080p HEVC playback, fails and defaults to ff-hevc decoding
23:54:16.117 - First 720p HEVC file again. Playback fails and defaults to ff-hevc decoding

I can successful repeat playback of various 720p file any number of times. 1080p HEVC is when issues occur.
Pages: 1 2