I've recently received my new Pi 4 2Gb and wanted to test the hardware decoding for videos in Chromium, so I found this thread. I've installed latest Raspbian Buster (Release date:2019-07-10), and just to compare cpu usage, I've created a small html file that loads and plays a FullHD mp4 video file from SD storage (H264 coded). I'm opening this file in Chromium, so that I can see whether hardware video decoding works or not in Chromium. I've also checked cpu usage playing the video with omxplayer and vlc. My screen is a FullHD screen, so Desktop size is 1920x1080 pixels.
So my results are that playing the H264 coded video inside Chromium results in a cpu usage of about 20% and video is not as smooth as it should be. On the other side, playing the video with omxplayer results in almost 0% cpu usage and video is playing absolutely smooth, and playing the video with vlc results in about 5% cpu usage and smooth playing in window mode, and in fullscreen mode the cpu usage is almost 0% and playing is as smooth as omxplayer.
I've also checked chrome://gpu information and it is telling that video decoding is not hardware accelerated (Video Decode: Unavailable):
Code: Select all
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Unavailable
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Unavailable
Viz Service Display Compositor: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
So, I see there's an improvement when using FKMS driver instead of the Legacy driver, because cpu usage in Chrome when playing videos is lower, but it's still very high when compared to omxplayer or vlc which are using hardware video decoding.
So my questions are:
Is Chromium really using hardware video decoding although it tells it isn't in chrome://gpu?
If it is using hardware video decoding, why is it using so much cpu when compared to vlc (I know omxplayer is not really comparable because is is overriding the X system) and although it is using much more cpu, the videos are not playing as smooth as they should?
Are there any configuration changes that could improve these Chromium figures and make it approach to vlc performance?