title: Electron Linux Video Hardware Acceleration
body: <p>Im having a hard time getting hardware acceleration for videos working in electron running on Linux (ARM64) and Linux (Intel64). Im not sure if this is an issue with the flags electron is using for chromium or if its more an issue at drive level on the host machines. Or maybe it's just not possible. Both machines are running Chromium 95 snap 64 bit.</p>
  <p>When running chromium (ARM64) without any flags and running chrome://gpu i get the following:</p>
  <p><a href="https://i.stack.imgur.com/yMHsD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yMHsD.png" alt="chrome://gpu" /></a></p>
  <p>When running chromium (ARM64) with --enable-features=VaapiVideoDecoder i get the following:
  <a href="https://i.stack.imgur.com/bZR7P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bZR7P.png" alt="chrome://gpu" /></a></p>
  <p>This leads me to believe that when calling chrome with the flag hardware acceleration should be working. Just to add to the complexity of this if i go to youtube and check media it looks like it may still be disabled (even with the flags):</p>
  <p><a href="https://i.stack.imgur.com/21ftW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/21ftW.png" alt="enter image description here" /></a></p>
  <p>I have read through a number of articles titled 'how to enable hardware acceleration in electron'. Most of which list the following flags to provide:</p>
  <pre><code>app.commandLine.appendSwitch('ignore-gpu-blacklist')
  app.commandLine.appendSwitch('enable-gpu-rasterization')
  app.commandLine.appendSwitch('enable-accelerated-video')
  app.commandLine.appendSwitch('enable-accelerated-video-decode')
  app.commandLine.appendSwitch('use-gl', 'desktop')
  app.commandLine.appendSwitch('enable-features', 'VaapiVideoDecoder')
  </code></pre>
  <p>I have tried all of these but nothing seems to make any difference. When running a video in electron it has the following properties:</p>
  <p><a href="https://i.stack.imgur.com/q5bNA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q5bNA.png" alt="enter image description here" /></a></p>
  <p>Is anyone able to point me in the right direction with this? Thank you.</p>