I believe we've faced the same issue. We are trying to to upgrade build-in webview in AOSP.
We are using Android 6.0. CPU consumption during playing h264 encoded video became very high after upgrading to latest webview. We are sure that corresponding MediaCodec for h264 exists and it worked fine with old webview version.
- Is it possible to check which codec exactly is used (I see nothing related in logcat during youtube playing for instance)? How could we do it?
- I see my 'hardware-accelerated' decoder in MediaCodecInfo.getCodecInfos(). Does it mean that webview also see it and should decode corresponding video using it? How does webview/chromium understand whether decoder is hardware accelerated or not?
- I do understand that this is very device specific question but could you please help us with understanding what is expected load on CPU during video decoding (very roughly)? For instance we want to play 1080p h264 decoded video on 4-core arm64 processor. What CPU load should we expect in case of software/hardware decoding?
> On Mon, Feb 6, 2017 at 8:49 PM, Chen Zhixiang <
cten...@gmail.com> wrote:
>
>
> We are planing to update our custom embedder's chromium kernel from M43 to M56+.
>
>
> The 2 bugs which are found on M43:
> (1) M43 uses MediaPlayer, (i guess M46+ switched to MediaCodec), which doesn't support HLS streaming video pause-then-resume.
>
>
> It's not clear what bug you're describing here. For HLS playback we still use MediaPlayer but through a new mechanism instead of the WebMediaPlayerAndroid path. MediaCodec has always been the only way to play MSE content like YouTube. Starting in M52+ we use ffmpeg to demux src= content, MediaCodec for "accelerated" video decoding, and ffmpeg for audio decoding (except in the encrypted content case).
>
>
>
> (2) 2d-canvas's sub-texture copy(gpu to gpu) broken on Android 7.0, which is not related here
>
>
> So, i'm not familiar with Android MediaPlayer or MediaCodec API. but i thought: there are in fact both "HW acceleration"? Or the "HW acceleration" just means the video decoding on gpu driver? Because where MediaPlayer or MediaCodec, the decodec video frames are always passed to Chromium's compositing code path.
>
>
> Neither is always hardware acceleration, but both generally are; internally either may use software decoders depending on the device's codec support. For common H264 bitstreams this is almost always hardware decoding.
>
>
>
>
>
> On Tuesday, February 7, 2017 at 1:39:57 AM UTC+8, Dale Curtis wrote:
> The unified media pipeline requires a working MediaCodec implementation. If this is unavailable on your hardware you will need to launch chrome with --disable-accelerated-video-decode (or flip it in chrome://flags) so we can fall back to MediaPlayer.
>
>
> Note, any site using MSE (e.g., YouTube will not work in this configuration); though if MediaCodec is broken it shouldn't have worked previously either. If it did, please file a bug and include chrome://gpu, chrome://media-internals, and logcat information for the failure.
>
>
>
>
>
> - dale
>
>
> On Mon, Feb 6, 2017 at 5:43 AM, Daniel <
tde.bewa...@gmail.com> wrote:
>
> Hello Chromium team!
>
> We really would like to use the newest Chromium browser on our Android-compatible custom tablet hardware.
> We are able to build the newest Chromium from source and the app works, but the hardware acceleration for video does not work.
> Video HW acceleartion works for older Chromium versions (for example Chrome 30 or 43), but not for the newest versions.
>
> We use a custom build of Android 4.4 (KitKat) on our custom tablet hardware.
> Currently we use the standard Android 4.4 AOSP browser (based on Chromium 30).
>
> In short:
> Chrome 30: HW acceleration for Video works (using MediaPlayer)Chrome 43: HW acceleration for Video works (using MediaPlayer)Chrome 53+: HW acceleration for Video does NOT work (we think because MediaPlayer is no longer used)