High CPU on video playback (Anthias Docker on Raspberry Pi 5)

Hi everyone! I’m looking for help and to know if anyone faced the same issue.

Hardware

  • Raspberry Pi 5 Model B – 4 GB RAM
  • Waveshare PCIe-to-M.2 Adapter with PoE
  • Official Raspberry Pi NVMe SSD 256 GB

OS & Setup

  • Raspberry Pi OS Lite (Bookworm), fully updated
  • Anthias running in Docker (Pi5 images, latest tags)
  • Followed raspberry-pi5-ssd-install-instructions.md

Issue

  • Full HD videos are played by ffplay

  • CPU usage jumps to constant 80–90% during playback

  • The fan gets very loud when CPU maxes out

  • Example process:

What I tried

  • Converted assets to HEVC (hvc1)

Comparison

  • Balena image: playback is smooth (no high CPU)
  • Raspberry Pi 4 with Anthias Docker: playback is smooth
  • Problem only on Raspberry Pi 5

How can I enable hardware-accelerated playback on Pi 5 with the Anthias Docker viewer?

Is there a way to force VLC, or recommended ffplay flags to use hardware HEVC decode on Pi 5?

Thanks in advance!

@6_HP_9, Anthias is currently using ffplay for the Raspberry 5 to play videos.

VLC is an option. However, a fair bit of work might be needed.

Thanks for the clarification.

I’m OK staying with ffplay on Raspberry Pi 5. I just need hardware decode so CPU (and the fan) don’t spike on 1080p. Not sure if it’s even possible.

I have a few questions though:

  1. Is there a config or env var to pass extra ffplay args from docker-compose? For example, adding -vcodec hevc_v4l2m2m when the file is HEVC.

  2. If not, is there a supported place to inject custom player flags (config file, hook, or override script) without forking?

  3. For the VLC option, is there a dev tag/branch I can test? Also, could you elaborate on the “fair bit of work”? I might give it a try.

Thanks

@6_HP_9, I tried to get inside the anthias-viewer container and run videos via VLC but there’s no audio or video. By fair bit of work, I mean trying things like installing an X server and configuring VLC to start via the X11 by setting DISPLAY to :0 (e.g., export DISPLAY=:0). Feel free to try ffplay with X11 if you’d like to explore as well.

Thanks again. I’ll give it a try and share it, if I’m successful.

Was there ever a resolution to this? Have just a video on a Raspberry Pi 5 and its pinning CPU - exactly same results as above. Would currently make me want to only run static assets to avoid CPU/fan spikes.
(Thanks in advance - otherwise an absolutely cracking bit of software and very appreciative)

@vinividivici, we’re still in the process of resolving other bugs that might be connected to or that might affect this issue. However contributions are always welcome if you have something in mind.

This should be much better now. The high CPU during video came from the old way the player handled each frame, copying it through the CPU before showing it. The video path was rebuilt to draw frames directly on the screen instead (#2975), with frame pacing added in #3006, which removes that heavy work. Please update to the latest release. Marking this as solved. If CPU is still high during video on the latest, let us know your setup.