AnsweredAssumed Answered

MP4 video playback not working in QtWebEngine

Question asked by Chris Trowbridge on Dec 14, 2017
Latest reply on Dec 15, 2017 by igorpadykov

Hi all,


I’m running into some issues trying to get MP4 playback through QtWebEngine 5.9.2.


Our hardware is a DFI KS310 ( running an i.MX6 ARM processor. We are using Yocto to build the OS based on version 3.14.52 of the Linux kernel and are including the qtwebengine recipe from Yocto to include it in the image. We are also using Wayland/Weston as a compositor.


When I run the Qt5 minimal browser sample application and navigate to a page that contains an MP4 video file (embedded in a <video> HTML tag), the app crashes with a segmentation fault and the following stack trace:

Received signal 11 SEGV_MAPERR 000069646551

#0 0x0000b4108086 <unknown>

#1 0x0000b4108356 <unknown>

#2 0x0000b33b0b80 <unknown>

[end of stack trace]


At first, I thought this was because the default compilation configuration for QtWebEngine (and Chromium) disables support for proprietary codecs. So, I changed the compilation configuration to enable proprietary codecs, but the Qt5 minimal browser application still crashes when trying to display the MP4 video.


My next thought was to ensure that hardware acceleration was fully enabled in the underlying instance of Chromium. I was able to achieve almost full hardware acceleration by adding the following command line switches when running the Qt5 minimal browser application:

--ignore-gpu-blacklist --disable-gpu-sandbox --blacklist-accelerated-compositing --enable-native-gpu-memory-buffers


After this, the ‘chrome://gpu’ page in Chromium reported:


Graphics Feature Status:

  • 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: Hardware accelerated
  • Rasterization: Software only. Hardware acceleration disabled
  • Video Decode: Software only. Hardware acceleration disabled
  • VPx Video Decode: Software only. Hardware acceleration disabled
  • WebGL: Hardware accelerated
  • WebGL2: Hardware accelerated

Problems Detected:

  • Clear uniforms before first program use on all platforms: 124764, 349137 - Applied Workarounds: clear_uniforms_first_program_use
  • Always rewrite vec/mat constructors to be consistent: 398694 - Applied Workarounds: scalarize_vec_and_mat_constructor_args
  • Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198 - Applied Workarounds: disable_framebuffer_cmaa
  • Accelerated video decode has been disabled, either via blacklist, about:flags or the command line. - Disabled Features: video_decode
  • Accelerated rasterization has been disabled, either via blacklist, about:flags or the command line. - Disabled Features: rasterization
  • Accelerated VPx video decode has been disabled, either via blacklist, about:flags or the command line. - Disabled Features: vpx_decode

As you can see, it seems as though video decode and VPx video decode are not hardware accelerated, and I think this is where my real problem lies.


I also tried to load the same MP4 video file using Chromium (version 40), but the page crashes just the same as with QtWebEngine and displays an “Oh, snap” Chromium error message with no error messages on the console.


I have also tried to pre-install through Yocto many of the Freescale/NXP i.MX6 graphics support libraries and drivers, but it’s possible that I could be missing a vital one or not configuring one correctly:


  • Libfslvpuwrap (v1.0.62)
  • libavcodec
  • libavformat
  • libavutil
  • libexif (v0.6.21)
  • imx-gpu-viv (v5.0.11)
  • 0-fsl-plugin (v4.0.8)
  • 0-plugins-imx (v0.12.1)
  • imx-lib (v5.1)
  • imx-vpu (v5.4.32)
  • libfslcodec (v4.0.8)
  • libfslparser (v4.0.8)
  • libimxvpuapi (0.10.2)


Has anyone been able to get MP4 video playback to work in QtWebEngine built with Yocto on the i.MX6 chipset?