Animated background

AnkiWeb addon 917808147

Adds GIF and video backgrounds to the Reviewer, Deck Browser, and Overview screens, with live preview and controls for opacity, blur, zoom, playback speed, trimming, and mute.
AI-generated summary; may contain mistakes.

appearance

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
1 (πŸ‘ 1 Β· πŸ‘Ž 0)
Updated
2026-04-13
Anki versions
2.1.1~
License
GPL-3.0 (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

stale

  • Last update or commit: 2026-04-13 (202 days before the snapshot).
  • Test files: 3.
  • GitHub Actions workflows: 1.
  • Commits in the last year: 27.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.1+2026-04-13
History across monthly snapshots

Loading…

Similar addons

The Widget Addon

Transforms Anki's home screen into a customizable study dashboard with 34+ coordinated light/dark scenes, drag-and-drop widgets, progress stats, a review calendar heatmap, and countdown timers.

statisticsprogress-trackingappearance

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-10-29

Description

Animated Background

Animated Background lets you add GIF and video backgrounds to Anki’s main study screens, with a live preview and simple per-screen controls. Preview

IMPORTANT - Update note

A fix has been released for the update issue some Windows users saw with Animated Background.

What changed:

  • Settings and imported media are now stored in Anki’s profile data instead of inside the add-on’s user_files folder.
  • Packaged sample backgrounds are now stored as bundled read-only assets.
  • The add-on now releases video/background media handles before Anki updates the add-on.
  • Existing settings and imported media are migrated automatically on startup.

If you already hit the update error, you may need one manual cleanup before installing this version:

  1. Close Anki completely.
  2. Go to your Anki add-ons folder.
  3. Remove the add on manually

After this fixed version is installed, future updates should no longer depend on Anki’s fragile user_files backup step.

You can also remove the add on via the anki window, this will trigger an error, then restart anki, remove it again.

What It Does

  • Adds animated backgrounds to:
    • Reviewer
    • Deck Browser
    • Overview
  • Supports:
    • GIF
    • WebM
    • MP4
  • Includes packaged sample media
  • Lets you use your own local media folders
  • Offers live preview before saving
  • Includes controls for:
    • Opacity
    • Blur
    • Zoom
    • Playback speed
    • Trim start / trim end
    • Mute

How To Use

  1. Open Anki.
  2. Go to Tools > Animated Background.
  3. Choose a packaged sample folder or your own media folder.
  4. Select the screen(s) where you want the background to appear.
  5. Pick a GIF or video file.
  6. Adjust the preview and display settings.
  7. Click Save Settings.

Notes

  • Large GIFs and videos can affect performance.
  • If a file is moved or removed, the add-on will safely disable that background until you choose a new one.
  • MP4 and WebM playback depends on Qt/system multimedia support, so some files may not work on every machine.

Support

If you run into a bug or want to request a feature, please use the support page.

Compatibility

  • Desktop only
  • Minimum Anki version: 24.06.0

README

AnkiAnimatedBackground

AnkiAnimatedBackground logo

Animated GIF and video backgrounds for Anki, with live preview and per-screen controls.

Animated Background settings preview

Overview

AnkiAnimatedBackground adds animated backgrounds to Anki's core study surfaces while keeping the add-on workflow focused on real usage:

  • Reviewer support for card study sessions
  • Deck Browser support for navigation and deck selection
  • Overview support for deck landing pages
  • Live preview in the settings dialog before saving changes
  • Support for packaged sample media and user-selected local folders
  • Controls for opacity, blur, zoom, trim, mute, and playback speed

Supported media formats:

  • gif
  • webm
  • mp4

Tutorial

Install

  1. Build or download the .ankiaddon package.
  2. Open Anki.
  3. Go to Tools -> Add-ons.
  4. Drag the .ankiaddon file into the Add-ons window.
  5. Restart Anki.

First Run

  1. Open Tools -> Animated Background.
  2. Leave the packaged sample selected, or choose your own source folder.
  3. Pick which screens should receive the background:
    • Reviewer
    • Deck Browser
    • Overview
  4. Adjust the display controls:
    • Opacity
    • Blur
    • Zoom
    • Playback rate
    • Trim start / trim end
    • Mute
  5. Watch the live preview panel to confirm the result.
  6. Click Save Settings.

Everyday Use

  • Use packaged media for a zero-setup experience.
  • Use your own local folder if you want to browse a personal wallpaper collection.
  • If playback feels heavy, reduce video size, lower blur, or switch to a smaller file.
  • If a file becomes unavailable, reopen settings and pick a valid source again.

Architecture

The add-on is intentionally split into a few small modules with clear roles:

  • __init__.py Bootstraps the add-on, registers hooks, and exposes the settings dialog through Anki's Tools menu.
  • src/config/config_manager.py Owns config normalization, persistence, managed media handling, and source-folder resolution.
  • src/injector/webview_injector.py Injects image-based backgrounds and CSS into supported Anki webviews.
  • src/injector/background_controller.py Coordinates live background activation, native video playback, screen-state refresh, and cleanup.
  • src/view/settings_dialog.py Hosts the user workflow for selection, preview, tuning, reset, and save.

Runtime Map

Anki native runtime

  • Anki startup Loads the add-on entry point.
  • Main window / mw Hosts the Tools menu and the current active screen.
  • Reviewer / Deck Browser / Overview These are the supported screens that trigger background refreshes.
  • Qt WebView The HTML surface used for image injection and normal Anki content.
  • Qt Multimedia backend The native playback backend used for video backgrounds.

Add-on components

  • __init__.py Registers Anki hooks, creates shared services, and adds the Tools menu action.
  • ConfigManager Reads and writes profile-scoped add-on data, resolves selected media, and normalizes settings.
  • SettingsDialog Lets the user preview media, tune options, and persist changes.
  • WebviewInjector Injects CSS and image backgrounds directly into Anki's webview.
  • BackgroundController Decides whether a background should be active on the current screen and chooses the render path.
  • NativeVideoBackground Uses QMediaPlayer and a native overlay for video playback.

Add-on data

  • profile/addon_data/AnkiAnimatedBackground/config.json Persistent settings.
  • profile/addon_data/AnkiAnimatedBackground/media/ Managed imported media.
  • assets/default_media/ Built-in sample backgrounds distributed with the add-on.

Startup and wiring

  1. Anki startup loads __init__.py.
  2. __init__.py creates ConfigManager, WebviewInjector, and BackgroundController.
  3. __init__.py registers hooks on the Anki main window and exposes SettingsDialog from the Tools menu.

Settings flow

  1. SettingsDialog loads current values from ConfigManager.
  2. Live preview and staged changes are sent through BackgroundController.
  3. Saving writes normalized settings back through ConfigManager.

Image background path

  1. A supported Anki screen renders into Qt WebView.
  2. BackgroundController checks screen state and config.
  3. For image media, it delegates to WebviewInjector.
  4. WebviewInjector injects CSS and an image layer into the webview.

Video background path

  1. A supported Anki screen renders into Qt WebView.
  2. BackgroundController checks screen state and config.
  3. For video media, it delegates to NativeVideoBackground.
  4. NativeVideoBackground plays through the Qt Multimedia backend.
  5. The video is drawn as a native overlay above the webview instead of as injected HTML.

Data access

  • ConfigManager reads and writes profile-scoped add-on data.
  • ConfigManager resolves managed files from the profile media directory.
  • ConfigManager resolves packaged defaults from assets/default_media/.

Screen refresh rules

  • Anki screen-change hooks notify BackgroundController.
  • BackgroundController re-evaluates the current target screen and selected media.
  • If the screen is unsupported, disabled, or media is missing, the add-on clears the active background.

Design Patterns

  • Single source of truth: ConfigManager owns normalized runtime configuration and media-path resolution.
  • Controller pattern: BackgroundController decides when backgrounds should appear, disappear, or fail closed.
  • Strategy split by media type: image backgrounds are webview-injected, while video backgrounds use native Qt playback.
  • Staged editing workflow: the settings dialog lets the user preview and tune values before persisting them.
  • Defensive path handling: media resolution stays rooted to the add-on or the chosen source folder to avoid path escapes.

Project Layout

AnkiAnimatedBackground/
|-- __init__.py
|-- src/
|   |-- config/
|   |-- injector/
|   `-- view/
|-- assets/
|   |-- default_media/
|   `-- packaging/
|-- tests/
`-- dist/

Data Storage

Runtime data is stored in the active Anki profile:

  • <profile>/addon_data/AnkiAnimatedBackground/config.json
  • <profile>/addon_data/AnkiAnimatedBackground/media/

Packaged sample media lives inside the add-on package:

  • addons21/<addon>/assets/default_media/Wallpapers_anki/

Older versions stored runtime files under addons21/<addon>/user_files/. On startup, the add-on migrates those files into the profile data directory and retires the legacy folder so future Anki updates do not need to rename it.

Development

Build a local package with:

.\.venv\Scripts\python.exe package.py

Deploy to your local Anki add-ons folder with:

.\.venv\Scripts\python.exe deploy.py

Run the current test suite with:

.\.venv\Scripts\python.exe -m unittest discover -s tests -v

Notes And Limitations

  • Desktop only.
  • Large GIFs and videos can affect Anki responsiveness and memory usage.
  • Video playback quality depends on Qt multimedia backend support on the host machine.
  • Some codec or platform-specific failures may require switching to another file format or re-encoding the source video.

Output

Packaging produces:

  • dist/AnkiAnimatedBackground_<version>.ankiaddon

License

GPL-3.0. See LICENSE.