Introduce user-selectable options to disable Mediacodec for mpeg2, mpeg4, and h.264
#1
Feature request:

For android platforms, I propose an addition to "Player" section of settings under "Acceleration", below Mediacodec options, to allow user to enable/disable Mediacodec for mpeg2, mpeg4 and h264 codecs with options
"Always"
"HD and up"
"Never"

In many popular android platforms, such as Amazon Fire TV, not all legacy codecs, such as mpeg2 and especially interlaced mpeg2, interlaced h.264 are implemented properly, resulting in stuttering or otherwise unusable video playback for these formats. Currently most android arm devices can decode mpeg2 in software, and code to for that is present and works fine in current Kodi Leia 18.1. In the future Android arm processors will get faster and eventually they will be able to software decode and deinterlace h.264. I do not expect that Android firmware manufacturers will keep support for legacy video format in their firmware. Giving users an option for software decoding will give users more flexibility and reduce user complaints.

Fritsch has a patch for this already under branch androidswmpeg2 in his fork of Kodi:

commit [77fadae](https://github.com/xbmc/xbmc/commit/77fa...1b40f98ef4) (has a bug)
and
commit [4666efb](https://github.com/xbmc/xbmc/commit/4666...4fc2249f8b) (fixes the bug)

Currently I have this code implemented in my fork of Kodi, and I set mpeg4 and mpeg4 to hardware decode only "HD and up" and h.264 to hardware decode "Always". Works fine on Amazon Fire TV 3 and Fire TV stick 4K. Before these options my DVD ISOs with interlaced mpeg2 did not play properly. I can create and provide the patch for Kodi-master from the above commits.
Reply
#2
please see an apk below from fritsch
Reply
#3
No need to spread custom builds (where content is unknown): http://mirrors.kodi.tv/test-builds/andro...bi-v7a.apk

Our key android developer plans something else ... this was just a POC that will or will not help him.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#4
Thank you fritsch for posting your build -- I have downloaded it and will test it tonight!  I removed the link from my post.
Reply
#5
The build works fine on both fire TV 3 and fire stick 4K!
Reply
#6
(2019-02-21, 20:32)fritsch Wrote: No need to spread custom builds (where content is unknown): http://mirrors.kodi.tv/test-builds/andro...bi-v7a.apk

Our key android developer plans something else ... this was just a POC that will or will not help him.

Thx. @fritsch, now enjoying mpeg2 YADIF2x deinterlacing with quick TV channel Zapping & access to Lanczsos3-optimised upscaling.

ARM chipsets like AML S912 and above and the new FireTV Stick 4K are getting more powerful as the years roll by.

Be interested to see what easy to use SW/HW decode ARM Android options are "in the pipeline"

Reply
#7
I tried this .apk in an NVIDIA Shield TV, the options to select different HW decodings works as advertised, but later, when I try to change for example to lanczos3 upscalers the option doesn't appear (trying to upscale from 720p to 1080p).

If I disable HW decodings in both mediacodecs, the options for use lanzcos3, spline36 appears, but if I apply any of both upscalers, the video got broken and appears artifacs.

Thanks for your work!
Reply
#8
On fire tv 3 I do not have an option of Yadif deinterlacing in the onscreen menu when I choose to do software decoding for mpeg2 480i. Only Deinterlace or Deinterlace(half), or Off. Also any upscaler other than Bilinear or Nearest neighbor results in blurry picture. 
But the picture quality is good and smooth with Deinterlace and Bilinear scaling so I am not complaining.:-)
Reply
#9
I wanted to bump this thread.  @fritsch mentioned that the android developers have something different in mind regarding software decoding options for mpeg2, h.264 and mpeg4.  I have recently dicscovered that some 576p h.264 encoded videos do not play with hardware decode even on my rock solid S905X Libreelec box.  Fortunately there is a option to enable hardware decoding on libreelec only for "HD and up" videos.  Software decoding worked fine for these videos.

Could we expect inclusion of some switches to enable hardware decoding of mpeg2, mpeg4 or h.264 ONLY for "all" or "HD and up" oe "None" in the next Kodi version?    

Also @fritsch, your apk from androidswmpeg2 branch is no longer available on your test site.    I use my own compiled apk, which works fine, but it is compiled in debug mode, resulting in 96Mb apk.  How do I get the release 60-61Mb apk?
Reply
#10
Where can I find this version? The Netflix add-on plays some.stuff on h264 and that stutters on my firestick 4k.
Reply
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Introduce user-selectable options to disable Mediacodec for mpeg2, mpeg4, and h.26451