Thread Rating:
  • 0 Vote(s) - 0 Average
can kodi set framerate info through mediacodec api?
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!
XBMC-lover & trouble-maker
Is it that you want?
In float, I guess?
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.


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
@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...

can kodi set framerate info through mediacodec api?00