Enable Hardware Video Acceleration on Raspberry Pi

Enabling hardware-accelerated video playback on a Raspberry Pi offloads video decoding from the CPU to the dedicated Graphics Processing Unit (GPU). This process drastically reduces CPU usage, lowers operating temperatures, and prevents stuttering or dropped frames during high-definition playback. This guide covers how to configure your system settings, choose the right media player, and verify that hardware acceleration is active on your Raspberry Pi.

Step 1: Update Your System and Firmware

Before configuring hardware acceleration, ensure your operating system and GPU firmware are completely up to date. Newer versions of Raspberry Pi OS include optimized drivers that improve hardware decoding efficiency.

Open a terminal and run the following commands:

sudo apt update
sudo apt full-upgrade -y

Once the update finishes, reboot your Raspberry Pi to apply any kernel or firmware changes:

sudo reboot

Step 2: Configure GPU Memory Allocation

The GPU requires a dedicated amount of system RAM to handle hardware video decoding smoothly, especially for 1080p or 4K video.

  1. Open the Raspberry Pi Configuration tool from the desktop menu, or launch the terminal-based configuration tool:
sudo raspi-config
  1. Navigate to Performance Options (or Advanced Options on older firmware versions).
  2. Select GPU Memory.
  3. Change the value to at least 128 for 1080p playback, or 256 if you are streaming 4K video on a Raspberry Pi 4 or 5.
  4. Save the changes and exit the tool.
  5. Reboot your device to allocate the memory.

Step 3: Choose and Configure an Accelerated Media Player

Standard web browsers and default media players often rely on software decoding, which lags on low-power ARM processors. For smooth playback, you must use software specifically compiled to utilize the Pi’s hardware video decoder (V4L2 or MMAL).

VLC Media Player

VLC comes pre-installed on Raspberry Pi OS and features native hardware acceleration hooks.

  1. Launch VLC Media Player.
  2. Go to Tools > Preferences in the top menu.
  3. Click on the Input / Codecs tab.
  4. Locate the Hardware-accelerated decoding dropdown menu.
  5. Set this option to MMAL decode or V4L2 video decoding depending on your specific Raspberry Pi model.
  6. Click Save and restart VLC.

Chromium Web Browser (for YouTube and Streaming)

To get smooth playback on web streaming platforms, the Chromium browser must be configured to use the hardware GPU pipeline.

  1. Open Chromium and type chrome://flags into the address bar, then press Enter.
  2. Search for Hardware-accelerated video decode.
  3. Change the dropdown menu next to it from Default to Enabled.
  4. Search for Override software rendering list and change it to Enabled.
  5. Click the Relaunch button at the bottom right of the window to apply the settings.

Step 4: Verify Hardware Acceleration is Working

To confirm that the video decoding workload has successfully shifted to the GPU, you can monitor your CPU utilization during video playback.

Open a terminal window and run the monitoring tool:

htop

Play a high-definition video file or stream a 1080p video in your browser. If hardware acceleration is working correctly, the total CPU utilization across all cores should remain remarkably low (typically under 20-30%). If software decoding is still active, your CPU utilization will spike close to 100%, and the video will likely stutter.