Android Android M - Refresh Rate issue with libstagefright
#1
I'm running Android M (release version) on the Nexus Player (latest Google Play Kodi installed). I enabled "Adjust Display Refresh Rate" and the TV switches to 24p which looks great, but I get a strange display error from time to time. Video gets very jerky, here is a video: https://www.youtube.com/watch?v=bDa-EXz1Amo (bad quality but you see the problem, dunno why YT doesn't display it in 720p)

This happens with libstagefright enabled. I haven't noticed it with just MediaCodec.
Anyone know why this happens? I always read that I should run just libstagefright with Android devices but I'm not sure why or whether or not this is still true.

Any help would be appreciated. Thanks
Reply
#2
You should use Mediacodec.
Libstagefright is discontinued on Android and Kodi for Android focuses almost solely on Mediacodec now.
Reply
#3
(2015-10-07, 21:12)mo123 Wrote: You should use Mediacodec.
Libstagefright is discontinued on Android and Kodi for Android focuses almost solely on Mediacodec now.
with Mediacodec can be change Refresh Rate( HDMI port ) Dynamic to mach video? with all ARM SOC? Huh
LG OLED 55E8 - M9702(oppo 203) -  Dinobot U5PVR(Enigma 2) - Meccol KI pro(COREelec) - Sony PS5
AndroidPremiumPlayer blog - HI - Frequency Switcher 
Reply
#4
(2015-10-07, 17:05)meccs Wrote: I'm running Android M (release version) on the Nexus Player (latest Google Play Kodi installed). I enabled "Adjust Display Refresh Rate" and the TV switches to 24p which looks great, but I get a strange display error from time to time. Video gets very jerky, here is a video: https://www.youtube.com/watch?v=bDa-EXz1Amo (bad quality but you see the problem, dunno why YT doesn't display it in 720p)

This happens with libstagefright enabled. I haven't noticed it with just MediaCodec.
Anyone know why this happens? I always read that I should run just libstagefright with Android devices but I'm not sure why or whether or not this is still true.

Any help would be appreciated. Thanks

(2015-10-08, 17:50)looun Wrote:
(2015-10-07, 21:12)mo123 Wrote: You should use Mediacodec.
Libstagefright is discontinued on Android and Kodi for Android focuses almost solely on Mediacodec now.
with Mediacodec can be change Refresh Rate( HDMI port ) Dynamic to mach video? with all ARM SOC? Huh

On RK3368 devices with Rockchip Kodi or Wasser Kodi 15.2 you can use automatic refresh rate switching.
Also in SPMC on RK3288 devices.
Not sure how other Android devices work or Marshmallow.
Reply
#5
SPMC( and kodi i suppose ) use hack file( i knew ) :
Auto-framerate switching for Amlogic
(Needs 666 on /sys/class/display/mode)
Auto-framerate switching for Rockchip
(Needs 666 on /sys/class/display/display0.HDMI/mode)

not API or Mediacodec ,there is a lot of difference
LG OLED 55E8 - M9702(oppo 203) -  Dinobot U5PVR(Enigma 2) - Meccol KI pro(COREelec) - Sony PS5
AndroidPremiumPlayer blog - HI - Frequency Switcher 
Reply
#6
First of all thank you for that answer. MediaCodec looks and plays better on the Nexus Player.
Another question though. If I have "Adjust Display Refresh Rate" and see pc:1 in the CodecInfo, that means it is doing a 1:1 pulldown or in other words my TV is displaying the correct refresh rate for the selected movie?

The problem I noticed with my setup is that I have a slight slowdown after a few minutes of watching that is hardly noticeable but you can see it. It's like the frame rate gets slightly slower for 5 seconds or so and then back to normal. It comes back after a while and then disappears again. I can't see anything unusual on CodecInfo and it happens via LAN/Wifi and USB (loading/streaming the media file from there). It is not the file either since my PC plays it without problems. Any idea what that could be? I noticed it especially on 25fps content. No sound issues though (set to Passthrough)

A quick log file.

Currently running the latest Google Play version on the Nexus Player with release Android M.
Reply
#7
NOTICE For Kodi v16 "Jarvis"

Android Surface Rendering

Today we merged a change for Android which makes it possible for the GUI to be displayed at 1080p and the video playback at 4K. We now use the "android surface rendering" which is a default implementation of the Android system.
What this does is grant the ability for the device to render the Kodi GUI at say 1080p but actually do video playback at 4K.

This doesn't apply to amlogic devices with proper permissions, which will still use amcodec.

Any build from 24th October will have this change and should make any device that uses the proper implementation of the Android API.
Should you be able please test out these builds. Be warned that this is based on Kodi v16 and these are still devs builds and caution should be taken.

Disclaimer:
As we just implemented this change there could still be some minors bugs that could pop up with the variety of devices that will be solved during coming weeks.
In case you have a problem with video playback please provide proper debuglogs and information. Failing to do so the problem will be ignored.

Any device that is not able to do "android surface rendering" has not implemented the standard Android MediaCodec API the proper way. If this is the case please go ask your device manufacturer to do a proper job and release a fixed FW version. We as Team Kodi are not responsible for broken or bad firmware by device manufacturers. We will no longer implement any hacks or workarounds.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#8
I'm eager to try this out. As I mentioned in the nexus player thread (http://forum.kodi.tv/showthread.php?tid=...pid2141076), I'm seeing horrible interlacing-type artifacts with only Mediacodec enabled when attached to a 720p TV (does not happen with exact same device/file/etc. on a 1080p TV). And libstagefright freaks out with the video playing and the UI overlaying as mentioned in post #1.
Reply
#9
(2015-10-23, 23:12)jadedchameleon Wrote: I'm eager to try this out. As I mentioned in the nexus player thread (http://forum.kodi.tv/showthread.php?tid=...pid2141076), I'm seeing horrible interlacing-type artifacts with only Mediacodec enabled when attached to a 720p TV (does not happen with exact same device/file/etc. on a 1080p TV). And libstagefright freaks out with the video playing and the UI overlaying as mentioned in post #1.

Please test Kodi with new Mediacodec Surface codec.
---link removed--- (MOD edit)
All Kodi's from now on won't support libstagefright anymore.
Reply
#10
(2015-10-24, 10:37)mo123 Wrote:
(2015-10-23, 23:12)jadedchameleon Wrote: I'm eager to try this out. As I mentioned in the nexus player thread (http://forum.kodi.tv/showthread.php?tid=...pid2141076), I'm seeing horrible interlacing-type artifacts with only Mediacodec enabled when attached to a 720p TV (does not happen with exact same device/file/etc. on a 1080p TV). And libstagefright freaks out with the video playing and the UI overlaying as mentioned in post #1.

Please test Kodi with new Mediacodec Surface codec.

All Kodi's from now on won't support libstagefright anymore.

Please only reference nightly builds and not specific builds. This change should be available in latest build
http://mirrors.kodi.tv/nightlies/android/
For Nexus Player choose "x86".


NOTE:
please check again for a correct nightly in about 5 hours
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Android M - Refresh Rate issue with libstagefright0