backdrop-generator

backdrop-generator

Docker app from vlx42's Repository

Overview

Generates .mp4 backdrop clips from your Jellyfin/Emby movie and TV libraries using FFmpeg. Supports audio control and expert mode for custom FFmpeg parameters. Fully configurable via Unraid UI.

Jellyfin/Emby Backdrop Video Generator

Generates short .mp4 backdrop videos for Jellyfin or Emby libraries using FFmpeg.

πŸŽ₯ Features

  • Adjustable length, resolution, and compression
  • Audio control: Generate clips with or without audio (default: with audio)
  • Expert mode: Add custom FFmpeg parameters for advanced users
  • Avoids upscaling small sources
  • Safe random clip offset (not from start or end)
  • Automatically skips already processed files unless --force is used
  • Optional daemon mode for periodic rescanning
  • Failed attempt tracking with placeholder files

πŸš€ Usage

Build the Docker image

docker build -t backdrop-generator .

Run the generator

docker run --rm \
  -v /path/to/Movies:/movies \
  -v /path/to/TV:/tv \
  backdrop-generator \
  --movies /movies \
  --tv /tv \
  --length 5 \
  --resolution 720 \
  --crf 28 \
  --force \
  --timeout 30

Generate silent clips

docker run --rm \
  -v /path/to/Movies:/movies \
  -v /path/to/TV:/tv \
  -e NO_AUDIO=true \
  backdrop-generator

Expert mode with custom FFmpeg parameters

docker run --rm \
  -v /path/to/Movies:/movies \
  -v /path/to/TV:/tv \
  -e FFMPEG_EXTRA="-movflags +faststart -pix_fmt yuv420p" \
  backdrop-generator

Example Flags & Environment Variables

  • --length / LENGTH: Clip duration in seconds (default: 5)
  • --resolution / RESOLUTION: 720 or 1080 (default: 720)
  • --crf / CRF: Compression factor (lower is better quality; default: 28)
  • --force / FORCE: Regenerate even if backdrop exists (default: false)
  • --timeout / TIMEOUT: Timeout per FFmpeg call in seconds (default: 300)
  • --no-audio / NO_AUDIO: Generate clips without audio (default: false)
  • --ffmpeg-extra / FFMPEG_EXTRA: Custom FFmpeg parameters for expert users

πŸ”§ Advanced Configuration

Audio Options

By default, clips include audio encoded with AAC. To generate silent clips:

  • Set NO_AUDIO=true environment variable, or
  • Use --no-audio flag when running directly

Expert Mode

Add custom FFmpeg parameters using the FFMPEG_EXTRA environment variable:

# Example: Add fast start flag and specific pixel format
FFMPEG_EXTRA="-movflags +faststart -pix_fmt yuv420p"

# Example: Tune for film content with high profile
FFMPEG_EXTRA="-tune film -profile:v high"

# Example: Custom bitrate control
FFMPEG_EXTRA="-maxrate 2M -bufsize 4M"

Note: Custom parameters are added to the FFmpeg command line. Use quotes for parameters with spaces.

🐳 Dockerfile Based

This script uses FFmpeg inside a lightweight Python 3 image with minimal dependencies.

βœ… Compatible with

  • Jellyfin
  • Emby

πŸ“œ License

MIT

Install backdrop-generator on Unraid in a few clicks.

Find backdrop-generator in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for backdrop-generator Review the template variables and paths Click Install

Download Statistics

958
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
vlx42/backdrop-generator
Last Updated2025-06-23
First Seen2025-06-12

Runtime arguments

Network
bridge
Shell
bash
Privileged
false

Template configuration

Movies FolderPathrw

Path to your Movies folder.

Target
/movies
Default
/mnt/user/media/Movies
Value
/mnt/user/media/Movies
TV FolderPathrw

Path to your TV Shows folder.

Target
/tv
Default
/mnt/user/media/TV
Value
/mnt/user/media/TV
Clip LengthVariablerw

Length of each backdrop clip in seconds.

Target
LENGTH
Default
7
Value
7
ResolutionVariablerw

Output resolution (720 or 1080).

Target
RESOLUTION
Default
720
Value
720
CRFVariablerw

Compression quality (lower is better quality, 28–30 recommended).

Default
30
Value
30
TimeoutVariablerw

FFmpeg timeout per file (seconds).

Target
TIMEOUT
Default
30
Value
30
IntervalVariablerw

Time between scans in seconds (default: 6 hours).

Target
INTERVAL
Default
21600
Value
21600
Force OverwriteVariablerw

Force re-generation even if backdrop already exists.

Target
FORCE
Default
false
Value
false
Daemon ModeVariablerw

Enable daemon mode (runs continuously).

Target
DAEMON
Default
true
Value
true
No AudioVariablerw

Generate clips without audio (default: false = include audio).

Target
NO_AUDIO
Default
false
Value
false
Expert Mode - Custom FFmpeg ParametersVariablerw

Advanced: Additional FFmpeg parameters (e.g., '-movflags +faststart -pix_fmt yuv420p'). Leave empty for default behavior.

Target
FFMPEG_EXTRA