Emby preview thumbnails (BIF) with GPU acceleration

Emby's thumbnail extraction has no GPU option. Media Preview Generator makes Emby BIF files on a GPU and saves them next to each video.

Emby's built-in video preview thumbnail extraction has no GPU option. Emby staff describe it as FFmpeg plus Emby's own BIF writer. To make Emby's BIF files on a GPU, run Media Preview Generator in Docker. It decodes each video with FFmpeg on an NVIDIA, Intel or AMD GPU. It then saves <video name>-320-10.bif next to the video, the file name Emby itself uses when it saves previews into media folders, and tells Emby to pick it up. This needs write access to the media folder.

Emby's web player mid-scrub, showing a preview thumbnail this app made

Emby's web player on a test server. Tears of Steel, (CC) Blender Foundation | mango.blender.org, CC BY 3.0.

What Emby does on its own

Note

A GPU doesn't always help. One Emby plugin developer argues most of the time goes on reading and seeking the file, so hardware decode gains little (forum). On slow or busy disks that's true for this project too. A GPU helps when storage can keep up. On multi-disk shares, see the FAQ on disk-bound setups.

How Media Preview Generator makes Emby BIFs

  1. A trigger arrives: a webhook, a schedule, a "Recently Added" poll, or a manual pick.
  2. FFmpeg decodes the file on a GPU worker, and downscales and tone-maps HDR there. If the GPU can't decode a file, your other GPUs try it, then the CPU.
  3. The frames are packed into a BIF named <video name>-<width>-<interval>.bif and saved next to the video. Width defaults to 320, and the interval is your frame interval (default 10 seconds).
  4. The app tells Emby the file changed so Emby picks it up.

If the same file is also in Plex or Jellyfin, it is decoded once and each server gets its own output (multi-server guide).

When Sonarr or Radarr upgrades a file, the old file's BIF is removed. A companion <video name>-<width>-<interval>.bif.meta file records the source file's size and modification time. Later triggers skip files whose BIF is current, and redo files that were replaced (smart dedup).

Setup

  1. Run the container with your GPU passed through. See Getting Started — GPU Acceleration for the per-vendor docker run flags. Then add a GPU worker group in Settings → Workers (FFmpeg threads per worker lives under Settings → Processing Options → GPU device tuning). To use a GPU in another machine, add it as a worker node.
  2. Mount the media folder read-write. The BIF is written beside each video, so a :ro mount makes every write fail with "permission denied". Set PUID/PGID to a user that can write there. Emby doesn't need Plex's /plex mount.
  3. Add the Emby server in the setup wizard or under Servers. Use the server URL plus a username and password, or an API key.
  4. Add path mappings if Emby and the container see the media at different paths (Path Mappings).
  5. Open the server's Setup Health tab. It recommends turning off Emby's own scan-time thumbnail extraction and chapter-image extraction, so Emby doesn't repeat the work. It also recommends turning on real-time monitoring, so new files are noticed quickly. Each is one click (details).

Triggers for Emby

Other Emby BIF tools

See the comparison page for when Emby's built-in is the better pick.

Limits

Edit this page on GitHub
Type to search the documentation.