Sign inSign up

derekshreds/snacks-docker

By derekshreds

Updated 21 days ago

Image
0

10K+

derekshreds/snacks-docker repository overview

Snacks — Automated Media Library Transcoder

Snacks is a free, open-source, self-hosted transcoder for video and music libraries. It scans, analyzes, remuxes, encodes, verifies, and automates ongoing library maintenance from one web interface.

Website: snacksvideo.com | Documentation: snacksvideo.com/docs | Source: GitHub


Quick Start

services:
  snacks:
    image: derekshreds/snacks-docker:latest
    container_name: snacks
    network_mode: host
    volumes:
      - /path/to/media:/app/work/uploads
      - /path/to/snacks/config:/app/work/config
      - /path/to/snacks/logs:/app/work/logs
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - SNACKS_WORK_DIR=/app/work
      - FFMPEG_PATH=/usr/lib/jellyfin-ffmpeg/ffmpeg
      - FFPROBE_PATH=/usr/lib/jellyfin-ffmpeg/ffprobe
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped

Change the three host paths, remove devices if the host has no Intel or AMD GPU, start the service, and open http://YOUR-SERVER-IP:6767.

Host networking lets cluster UDP discovery reach the LAN. For a standalone bridge-network deployment, remove network_mode: host and add:

ports:
  - "6767:6767"

Bridge networking requires manual node URLs if you later create a cluster. Automatic discovery uses the fixed UDP port 6768.

Originals are not replaced unless Replace Original Files is explicitly enabled. Start with Analyze, leave replacement disabled, and test with a copy of one representative file.

What Snacks Includes

  • Separate video and music pipelines with persistent SQLite library state
  • H.264, HEVC/H.265, and AV1 output with MKV, MP4, and WebM containers subject to their compatibility rules
  • Smart filtering that skips media already meeting the selected policy
  • Quality presets plus detailed video, audio, subtitle, crop, HDR, and file-handling controls
  • Optional Advanced Video recipes, ordered source-property rules, policy validation, library-impact previews, and JSON policy sharing
  • Automatic scanning, exclusions, change detection, and interrupted-transfer protection
  • Live progress, queue controls, encode analytics, library health checks, diagnostics, and per-job logs
  • Output verification with retry paths for decode, subtitle, and hardware failures
  • Distributed encoding with coordinator and worker roles, device-aware slots, schedules, and shared-storage support
  • Plex and Jellyfin rescans; Sonarr, Radarr, TMDb, and TheTVDB connectivity
  • Webhook, Discord, ntfy, and Apprise notifications
  • Homarr compact iframe tile and native Media Transcoding widget support
  • API-key authentication, environment-variable overrides, OpenAPI, SignalR, Prometheus metrics, and health endpoints

Persistent Storage

MountPurpose
/app/work/uploadsMedia library visible to Snacks
/app/work/configSettings, presets, credentials, cluster configuration, and SQLite catalog
/app/work/logsRolling application logs and per-encode FFmpeg logs

Mount any separate output or scratch directory into the container before selecting it in Snacks. Back up the complete config directory as one unit while Snacks is stopped.

Hardware Acceleration

HardwareDocker / Linux path
NVIDIANVENC through the NVIDIA container runtime
IntelVAAPI through /dev/dri
AMDVAAPI through /dev/dri
CPUx264, x265, and SVT-AV1 software encoders

Snacks tests real encoder availability at startup and can fall back to safer decode, subtitle, or software paths where the selected policy permits it. Linux detection checks every /dev/dri/renderD* device rather than assuming the first render node is the desired GPU.

QNAP commonly requires privileged: true for /dev/dri access because its video/render group layout differs from conventional Linux hosts. Unraid normally uses device/group access instead.

NVIDIA NVENC

Install the NVIDIA Container Toolkit, then add this to the service:

runtime: nvidia
environment:
  - ASPNETCORE_ENVIRONMENT=Production
  - SNACKS_WORK_DIR=/app/work
  - FFMPEG_PATH=/usr/lib/jellyfin-ffmpeg/ffmpeg
  - FFPROBE_PATH=/usr/lib/jellyfin-ffmpeg/ffprobe
  - NVIDIA_VISIBLE_DEVICES=all
  - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility

Passing /dev/dri or enabling privileged mode alone does not provide NVENC.

Healthcheck

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost:6767/api/health"]
  interval: 30s
  timeout: 10s
  retries: 3
  start_period: 40s

Supported Hosts

The container runs on QNAP, Synology, Unraid, and Linux Docker hosts. Native Windows 10/11 and Apple silicon macOS 11+ downloads are available from the latest GitHub release.

Tag summary

Content type

Image

Digest

sha256:77c4d6353

Size

563.7 MB

Last updated

21 days ago

docker pull derekshreds/snacks-docker