简体   繁体   中英

MediaCodec Lollipop not decoding raw H264 stream 1080P at 60 FPS

This is my follow up question to below thread

Slow H264 1080P@60fps Decoding on Android Lollipop 5.0.2

On the path of debugging the root cause of above issue, I tried various approach to Decode 1080P at 60 FPS.

  • I tried wrapping H264 data into a MP4 container(without transcoding). The playback of MP4 with various stock player seems slow(less than 60fps , around 42fps).

  • I tried using native codec samples from Android NDK. Still no progress.

  • Later I compiles the mxc-vpu-test code from the Freescale Android Source
    tree. With this and using the correct parameters, I was Capable of
    playing the video at 60 FPS.

So My doubts are

  1. Is the decoder capable of playing 1080p@60fps video, with correct Frame rate ?
  2. If so, then why MediaCodec ( using ACodec code internally ) is not capable of playing 1080p@60fps video.
  3. I am not sure if OMXCodec is used in this process, Where can I get OMXCodec sample code to decode my video.

Is the decoder capable of playing 1080p@60fps video, with correct Frame rate ?

Totally depends on the device.

If so, then why MediaCodec ( using ACodec code internally ) is not capable of playing 1080p@60fps video.

h.264 has levels. 1080p@60 requires level 4.2 or higher. If the chip on your device only supports 4.0, then it cant do 1080@60. Why? Money and battery. 1080@60 requires twice the decoding power of 1080@30, cutting into profit margins and battery life for something most people will never notice.

I am not sure if OMXCodec is used in this process, Where can I get OMXCodec sample code to decode my video.

"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM