can kodi set framerate info through mediacodec api? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: VideoPlayer Development (https://forum.kodi.tv/forumdisplay.php?fid=240) +---- Thread: can kodi set framerate info through mediacodec api? (/showthread.php?tid=310956) |
can kodi set framerate info through mediacodec api? - yvonne.chen - 2017-03-31 Hello Guys For some MKV or AVI files with unstable pts. We need to use duration to keep video out smooth. Can kodi send frame-rate to mediacodec ? Thanks! RE: can kodi set framerate info through mediacodec api? - Koying - 2017-04-02 Is it https://developer.android.com/reference/android/media/MediaFormat.html#KEY_FRAME_RATE that you want? In float, I guess? RE: can kodi set framerate info through mediacodec api? - peak3d - 2017-04-02 I guess the issue is: mkv stores DTS and not PTS values. The current mediacodec implementation handle things wrong: DTS are passed as PTS just hoping that it matches (what is not true for mkv/vc-1 + b-frames). For linux / amlogic we already changed a.) the kodi implementation and b.) the kernel driver. For android the simplest way ist simply to pass 0 as timestamp in case we don't have pts from stream container. Drawback is that a/v sync gets worse over the time. Solutions: a.) Use VC-1 Bitstreamconverter and calculate PTS from DTS (nothing magic but need to buffer ~16 frames b) Talk to amlogic that they adapt our changes to android kernel so we let aml vc-1 decoder do things right. a.) would be a short term solution, but costs some cpu (b is from cpu for free) Edit: Just to make it more clear: If you pass 0 as PTS to mediacodec on ARM devices, AML driver uses duration internally. 0 ist the PTS_NO_VALUE value for mediacodec RE: can kodi set framerate info through mediacodec api? - Koying - 2017-04-03 @peak3d not sure we speak about the same issue. Amlcodec always needed the framerate, and aml mediacodec is just a layer above amcodec /amplayer if I got it right, so I guess aml mediacodec still needs the framerate, somehow, when mkv are not extracted via the built-in mediaextractor... |