Kodi Community Forum

Full Version: Xiaomi 4K HDR 'Mi Box' (Android TV set-top box)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2017-11-02, 00:57)wrxtasy Wrote: [ -> ]
(2017-11-01, 19:04)diogosena Wrote: [ -> ]Hi, I'm trying to see LiveTv using MiBox trough my internal TvHeadend server, but the 1080i image is rendered at half size and stretched, giving very bad quality.
I already tested many players, the only ones that got right are stock MoviePlayer (com.droidlogic.videoplayer) and MXPlayer in HW Mode (HW+ has problems too)

I'm using Nougat 1028 with root, there's any way to finally activate those AmCodec ? Already checked permissions, they are right..

Any ideas?

Yep give up. Xiaomi have stuffed up their AMLcodec implementation and that is definitely needed for reliable high quality TV deinterlacing because the current implementation is lousy both for Live Channels and Kodi Krypton when it works.

Use a AMLogic or Intel LibreELEC Kodi Krypton box if you are serious about TvHeadend and reliable Interlaced  TV viewing.

Don't give up too soon.. I managed to solve it!

This is how you enable amcodec in spmc
https://github.com/koying/SPMC/issues/10...-341298748
(2017-11-01, 19:04)diogosena Wrote: [ -> ]Hi, I'm trying to see LiveTv using MiBox trough my internal TvHeadend server, but the 1080i image is rendered at half size and stretched, giving very bad quality.
I already tested many players, the only ones that got right are stock MoviePlayer (com.droidlogic.videoplayer) and MXPlayer in HW Mode (HW+ has problems too)

I'm using Nougat 1028 with root, there's any way to finally activate those AmCodec ? Already checked permissions, they are right..

Any ideas?

Here's a sample clip 30Mb (look at the logo)
https://mega.nz/#!fB4yRDaa!Mb0TFoM-WjtNa...EcV20locow

(2017-11-02, 14:35)diogosena Wrote: [ -> ]
(2017-11-02, 00:57)wrxtasy Wrote: [ -> ]
(2017-11-01, 19:04)diogosena Wrote: [ -> ]Hi, I'm trying to see LiveTv using MiBox trough my internal TvHeadend server, but the 1080i image is rendered at half size and stretched, giving very bad quality.
I already tested many players, the only ones that got right are stock MoviePlayer (com.droidlogic.videoplayer) and MXPlayer in HW Mode (HW+ has problems too)

I'm using Nougat 1028 with root, there's any way to finally activate those AmCodec ? Already checked permissions, they are right..

Any ideas?

Yep give up. Xiaomi have stuffed up their AMLcodec implementation and that is definitely needed for reliable high quality TV deinterlacing because the current implementation is lousy both for Live Channels and Kodi Krypton when it works.

Use a AMLogic or Intel LibreELEC Kodi Krypton box if you are serious about TvHeadend and reliable Interlaced  TV viewing.

Don't give up too soon.. I managed to solve it!

This is how you enable amcodec in spmc
https://github.com/koying/SPMC/issues/10...-341298748

Wow! Have you noticed any performance improvement? Big Grin
(2017-11-02, 21:08)tiku100 Wrote: [ -> ]
(2017-11-01, 19:04)diogosena Wrote: [ -> ]Hi, I'm trying to see LiveTv using MiBox trough my internal TvHeadend server, but the 1080i image is rendered at half size and stretched, giving very bad quality.
I already tested many players, the only ones that got right are stock MoviePlayer (com.droidlogic.videoplayer) and MXPlayer in HW Mode (HW+ has problems too)

I'm using Nougat 1028 with root, there's any way to finally activate those AmCodec ? Already checked permissions, they are right..

Any ideas?

Here's a sample clip 30Mb (look at the logo)
https://mega.nz/#!fB4yRDaa!Mb0TFoM-WjtNa...EcV20locow

(2017-11-02, 14:35)diogosena Wrote: [ -> ]
(2017-11-02, 00:57)wrxtasy Wrote: [ -> ]Yep give up. Xiaomi have stuffed up their AMLcodec implementation and that is definitely needed for reliable high quality TV deinterlacing because the current implementation is lousy both for Live Channels and Kodi Krypton when it works.

Use a AMLogic or Intel LibreELEC Kodi Krypton box if you are serious about TvHeadend and reliable Interlaced  TV viewing.

Don't give up too soon.. I managed to solve it!

This is how you enable amcodec in spmc
https://github.com/koying/SPMC/issues/10...-341298748

Wow! Have you noticed any performance improvement? Big Grin


i didn't exactly compare performance, similar to mediacodec, but it can play things that mediacodec can't, like my tv stream.
@diogosena, nice work Sherlock with SPMC. It's a pity Xiaomi did not implement Amcodec properly because the Mi Box is fully capable.

I have had dynamic refresh switching working with the Movie Player App on Nougat Firmware 1028. Even used Kodi and it's external player functionality to activate such an App.

Refresh switching would also work now with your mods and SPMC if you issue a:

Code:
chmod 666 /sys/class/display/mode
(2017-11-03, 00:48)wrxtasy Wrote: [ -> ]@diogosena, nice work Sherlock with SPMC. It's a pity Xiaomi did not implement Amcodec properly because the Mi Box is fully capable.

I have had dynamic refresh switching working with the Movie Player App on Nougat Firmware 1028. Even used Kodi and it's external player functionality to activate such an App.

Refresh switching would also work now with your mods and SPMC if you issue a:

Code:
chmod 666 /sys/class/display/mode

right! tried so many things, forgot to note that one, i'll add to the post for future reference
Then - remember the "HDMI Self adaptation" Android settings function on some AMLogic boxes ?
Well that activates AMLogic's Frame Rate Automation functionality for smooth 23.976, 29.97 and 59.94fps video playback.

The equivalent of Android settings - HDMI Self Adaptation activation is:

Code:
echo 1 > /sys/class/tv/policy_fr_auto
echo 1 > /sys/class/tv/policy_fr_auto_switch

An echo 2 used to be Global Auto switching that even worked in various non Kodi / Plex Apps - but it seemed a bit experimental if you read the AML S9xx Linux Kernel comments. MINIX with their U9-H for example still have these Mode 1 and Mode 2 selections available in Android settings.
Wow guys congrats. Thank you for this, finally smooth video on my mibox Big Grin
@wrxtasy So with spmc auto switching its best to disable android HDMI selfadaptation? Or no?
HDMI Self Adaptation = AMLogic Frame Rate Automation Mode 1 which is exactly what you want enabled for smooth 23.976, 29.97, 59.94fps video playback once auto refresh switching is working with Amcodec hardware video acceleration. SPMC 16.7.1 (Jarvis) also naturally needs - Adjust Display Refresh Rate > Start/Stop

For Kodi Krypton Mediacodec Hardware video acceleration and working auto refresh switching, I believe there are specific AMLogic Firmware patches needed for Android, that only MINIX on their U9 and WeTek on the Hub / Play2 have implemented. No idea what those ones are.

There are also refresh switching 10bit HEVC playback bugs in AML Android Marshmallow Firmware when used with Mediacodec that only the real clever developers like @Ricardo with his WeTek Hub / Play2 Android TV ROM's has fixed when I helped him Log and bug bust. MINIX has also fixed this on the U9.

Not all AMLogic Android Boxes are created equal, especially when it comes to Android Marshmallow & Kodi Krypton compatibility. Nougat is a slight improvement.
Tnak you for this elaborate explanation. I admit im a framerate perv Big Grin , before I didnt even notice, but after a year or two on LE now is really bugging me when there is not framerate sync Smile

Thank you diogosena for sherlocking this Smile thank you

I will go to pimp my mibox now Smile, I will also try this amcodec with x265 4k HDR to see if it passes correct colorspace like recent kzaq builds on 905x LE and post back my findings..
Cheers
(2017-11-03, 00:48)wrxtasy Wrote: [ -> ]@diogosena, nice work Sherlock with SPMC. It's a pity Xiaomi did not implement Amcodec properly because the Mi Box is fully capable.

I have had dynamic refresh switching working with the Movie Player App on Nougat Firmware 1028. Even used Kodi and it's external player functionality to activate such an App.

Refresh switching would also work now with your mods and SPMC if you issue a:

Code:
chmod 666 /sys/class/display/mode

@wrxtasy - were you able to get the external player (amlogic player) to play network shares using Kodi (and if so how?). As far as I can see, it only handles local files this way.
No local only.
(2017-11-03, 12:25)woronczak Wrote: [ -> ]
(2017-11-03, 00:48)wrxtasy Wrote: [ -> ]@diogosena, nice work Sherlock with SPMC. It's a pity Xiaomi did not implement Amcodec properly because the Mi Box is fully capable.

I have had dynamic refresh switching working with the Movie Player App on Nougat Firmware 1028. Even used Kodi and it's external player functionality to activate such an App.

Refresh switching would also work now with your mods and SPMC if you issue a:

Code:
chmod 666 /sys/class/display/mode

@wrxtasy - were you able to get the external player (amlogic player) to play network shares using Kodi (and if so how?). As far as I can see, it only handles local files this way.
Ok Kool thanks. Refresh rate switching works with spmc by the way with the chmod changes. Awesome troubleshooting guys
Just to confirm spcm refresh work great, even with 4k movies Big Grin

HDR atrirbutes still doesnt get passed in spmc (16 or 17), I tried every posibble combination.
I even tried to do this command:
Code:
echo '444,10bit' > /sys/class/amhdmitx/amhdmitx0/attr
That makes s905x on LE to display HDR bt2020 correctly but mibox doesnt have this "atr" atribute

EDIT : wait, so only thing that xioami had to do to enable auto refresh rate switching was : chmod 666 Angry  works with mediacodec too
After further testing i noticed refresh rate doesnt work with amcodec on my old Sony LCD. After starting video the screen switches to black screen only. Changing input to another hdmi input and then back to input (where kodi is connected) gets me the video again but with 60hz refresh rate.
After turning off amcodec in kodi settings automatic refresh rate sync works perfectly with default decoder (mediacodec).

On my new Samsung tv(2016) refresh rate switching works perfectly with both amcodec and mediacodec
(2017-10-31, 20:43)mazleu Wrote: [ -> ]First uninstall all Amazon apps
Install this small APK I 'create'  over sideload :
http://www.mediafire.com/file/tvx7wcc0nh...o_Hack.apk
On the first start you get ask to install the missing player. Say yes and you become a Android TV version (with homescreen button) and who works in FHD. Its the app from the Sony TVs.
After the installation you can removr the hack.

Hi, I tried installing from that link
But I'm not getting HD at all, amazon prime was stuck at SD only.
Anything else I need to change in the settings probably?