Skip to content
المشاريع

حول

Automated transcoding for your video and music libraries. Doubles as a media server with cluster support.

التصميم والوسائط

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
+١
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Snacks

Snacks

Locally hosted. Lightly toasted.

An open-source, self-hosted transcoder for video and music libraries.
Scan, analyze, remux, encode, verify, and automate from one polished interface.
Optionally, stream the library to the Snacks Player app with the built-in media server.

Latest release CI status Docker pulls MIT License Join the Snacks Discord

Website · Documentation · Offline guide · Downloads · Discord

Snacks encode dashboard showing storage savings, files encoded, encode time, compression, workload, and recent encodes

[!NOTE] New in 3.0: an optional media server streams your movies, shows, and music to Snacks Player, the new desktop app, and Snacks for Fire TV. It brings profiles and PINs, Direct Play, adaptive quality, HDR, subtitles, and transcodes spread across your cluster. It is off by default, and a transcoder-only install works exactly as before. See Optional media server below and the v3.0.0 release notes.

The library handles itself

Point Snacks at a video or music library, choose a preset, and let it do the repetitive work. It evaluates each file against the selected targets, skips media that is already suitable, and remuxes or transcodes everything else using the best available hardware path.

Automate the library
Watch folders, configurable scans, change detection, and transfer-safe processing keep new media moving without babysitting.
Use the hardware already there
NVIDIA, Intel, AMD, Apple VideoToolbox, and software encoders are detected and selected automatically.
Choose intent, not FFmpeg flags
Start with Space Saver, Balanced, Quality First, Max Compatibility, or a custom preset.
See the entire pipeline
Live progress, queue controls, savings analytics, health checks, and per-file logs stay in one interface.
Recover instead of giving up
Snacks validates outputs and can retry through progressively safer decode, subtitle, and software fallbacks.
Scale beyond one machine
Run standalone or distribute jobs across an authenticated cluster with automatic node discovery.
Watch it too
The optional media server plays the library in Snacks Player, with profiles, PINs, and parental controls.
Play anything, anywhere in the house
Direct Play when the device can, Direct Stream or a transcode when it can't, with adaptive quality, HDR, and subtitles.
Take a closer look at the interface
Snacks queue with cluster status and first-run guidance
Queue and onboarding. Current work, node status, and the next useful action.
Snacks quality preset selection in the settings interface
Presets with an escape hatch. Start simple, then tune codecs, audio, subtitles, and file handling.
Snacks distributed encoding and cluster security settings
Distributed encoding. Configure standalone, coordinator, and worker nodes from the same interface.

Install Snacks

Docker / NAS Windows macOS Linux desktop
QNAP, Synology, Unraid, and Linux hosts (amd64 and arm64) Native installer for Windows 10/11 Native Apple silicon DMG for macOS 11+ AppImage, .deb and tar.gz for x64 and arm64
Docker Hub · Setup guide Download latest Download latest Download latest

Snacks Player, the desktop app for the optional media server, is on the same releases page for Windows, macOS and Linux. So is Snacks for Fire TV, an APK you sideload onto a Fire TV. Both need Snacks v3.0.0 or later with the media server turned on.

New releases show a notice in the apps. Turn on Install updates automatically (off by default) in Settings and the signed macOS app, the Windows app, the AppImage and the .deb update themselves (the .deb asks for your password; on Windows you click Restart and approve the administrator prompt, and only updates signed with the same certificate as your install are accepted). The Linux tar.gz shows the notice with a download link instead. Before an update installs, Snacks finishes the encodes that are running and starts no new ones; the queue carries on after the restart.

Linux: AppImage and AppArmor. Ubuntu 24.04 and later block the user namespaces Chromium's sandbox needs unless an app has an AppArmor profile. The .deb installs one and runs sandboxed. The AppImage cannot, so on those systems it starts without the sandbox and says so once. To run it sandboxed, use the .deb, or allow the AppImage where you keep it (replace the path; repeat for Snacks Player):

printf 'abi <abi/4.0>,\ninclude <tunables/global>\nprofile snacks-appimage /home/*/Applications/Snacks-*.AppImage flags=(unconfined) {\n  userns,\n}\n' \
  | sudo tee /etc/apparmor.d/snacks-appimage && sudo apparmor_parser -r /etc/apparmor.d/snacks-appimage
Docker Compose quick start
services:
  snacks:
    image: derekshreds/snacks-docker:latest
    container_name: snacks
    network_mode: host
    volumes:
      - /path/to/media:/app/work/uploads
      - ./snacks/config:/app/work/config
      - ./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

Then open http://YOUR-SERVER-IP:6767.

  • Change /path/to/media to the library path on the host.
  • Remove devices when no Intel or AMD GPU is being passed through.
  • QNAP commonly requires privileged: true for /dev/dri access.
  • NVIDIA in Docker requires the NVIDIA Container Toolkit and runtime configuration.
  • Host networking allows automatic cluster discovery across the LAN.
  • Until sign-in is enabled (Settings → Security), Snacks only answers clients on local-network addresses. Enable it before port-forwarding or reverse-proxying Snacks to the internet.
  • Update with docker compose pull && docker compose up -d, or turn on Install updates automatically under Settings → System → Updates: the container then downloads signed server releases into /app/work/app (mount it, as the compose file does, to keep them when the container is recreated) and, after you click Restart, finishes its running encodes and restarts into them. If an update does not start, it goes back to the previous version. A release that needs a new image still asks for docker compose pull. Nothing gets the Docker socket. SNACKS_CONTAINER_UPDATES=false turns it off. The release check is anonymous and can be turned off there too.

See the complete Docker/NAS guide or the included deploy-compose.yml. Unraid users can start with unraid/snacks.xml.

How it works

  1. Scan — FFprobe inventories codec, bitrate, resolution, streams, and duration.
  2. Decide — the selected preset determines whether each file should be skipped, remuxed, or encoded. The opt-in Advanced Video layer can instead select reusable profiles with ordered source-property rules. Analyze mode previews those decisions without queueing work.
  3. Process — FFmpeg uses hardware acceleration when available and software when it is not.
  4. Verify — Snacks checks every result. The default Smaller Only policy rejects larger outputs; an Advanced quality profile can explicitly use Always Keep when predictable quality matters more than final size.
  5. Repeat — watch folders, integrations, notifications, and the API keep the workflow moving as the library changes.

[!IMPORTANT] Originals are not replaced unless Replace Original Files is explicitly enabled. For a first run, use Analyze, keep replacement disabled, and write to a separate output directory.

What is included

  • Video and music pipelines with independent settings
  • H.264, HEVC/H.265, and AV1 output
  • Opt-in Advanced Video profiles with codec/resolution/bitrate rules, CRF/CQ/QP modes, exact runtime-detected encoders, guarded FFmpeg options, and cluster-aware routing
  • MKV and MP4 containers
  • Quality presets plus detailed video, audio, subtitle, crop, and file-handling controls
  • NVIDIA NVENC, Intel QSV/VAAPI, AMD AMF/VAAPI, and Apple VideoToolbox support
  • Automatic scanning, exclusions, change detection, and interrupted-transfer protection
  • Persistent SQLite state across scans and restarts
  • Live SignalR progress, queue management, encode analytics, diagnostics, and logs
  • Dry-run directory analysis before anything is queued
  • Distributed encoding with coordinator and worker roles
  • Plex and Jellyfin library rescans
  • Sonarr, Radarr, Lidarr, TMDb, and TheTVDB connectivity
  • Homarr dashboards through either a compact Snacks iFrame tile or the native Media Transcoding widget via a read-only Tdarr adapter
  • Webhook, Discord, ntfy, and Apprise notifications
  • API-key authentication, environment-variable configuration, OpenAPI, and health endpoints
  • Optional media server (off by default): video and music libraries with TMDB metadata, profiles, households, PINs and parental controls, Direct Play, Direct Stream, and transcoding with adaptive quality, HDR, subtitles, seek thumbnails, and cluster playback
  • Snacks Player, the desktop app for the media server
Advanced Video policies

Advanced Video is opt-in and disabled by default — upgrading never changes existing settings or decisions, and the layer does nothing until you enable it. The settings panel shows the decision flow as plain-language cards and previews what a staged policy would do to your entire library — per-rule file counts, disk usage, and measured results from completed encodes included — before you apply anything. Policies export and import as plain JSON files for sharing. See the in-app Advanced Video guide and the AV1 quality-policy example.

Advanced Video decision flow: plain-language rule cards with live per-rule file counts
Library impact preview with per-outcome counts, disk usage, and measured results

Hardware acceleration matrix
Encoder Docker / Linux Windows macOS
NVIDIA NVENC CUDA CUDA —
Intel VAAPI QSV —
AMD VAAPI AMF —
Apple VideoToolbox — — H.264 / HEVC
Rockchip RK35xx (experimental, arm64) MPP: H.264 / HEVC — —
Software x264, x265, SVT-AV1 x264, x265, SVT-AV1 x264, x265, SVT-AV1

Every GPU in a machine is used (several NVIDIA cards, an iGPU next to a dedicated card); turn cards on or off with the Hardware button (or, on a cluster master, the gear) on the node's card in the Queue page's Cluster panel.

Apple silicon can use VideoToolbox for AV1 decoding where supported, but FFmpeg does not currently expose an AV1 VideoToolbox encoder. Snacks therefore pairs hardware decoding with SVT-AV1 software encoding for that path.

For NVIDIA containers, install the NVIDIA Container Toolkit on the host and use the NVIDIA runtime. Intel and AMD hosts can pass /dev/dri into the container.

Automation, integrations, and API

Everything needed for unattended operation is configurable from the UI, environment variables, or HTTP:

  • Pin encoder settings with SNACKS_SET_*
  • Configure auto-scan with SNACKS_SCAN_*
  • Configure integrations with SNACKS_INTEG_*
  • Pause and resume the queue, trigger scans, analyze directories, and enqueue media through the API
  • Authenticate automation with X-Api-Key or a bearer token when sign-in is enabled
  • Add the compact Snacks tile to Homarr, or point Homarr's Tdarr integration at Snacks for its native transcoding widget
  • Subscribe to real-time state through SignalR

Homarr can display Snacks in two ways:

Option What it provides Connection and credential
Snacks compact tile A read-only, responsive iFrame with Stats, Queue, and Workers tabs Each viewer's browser connects to Snacks using a scoped iframe URL generated under Settings → Security → Iframe Access
Homarr Media Transcoding widget Homarr's native transcoding UI backed by Snacks queue, worker, and savings data The Homarr server connects to Snacks through a Tdarr integration, using a Snacks API key when authentication is enabled

See the Homarr dashboard guide for complete setup steps, URL options, security notes, limitations, and troubleshooting for both choices.

Use the operations and API guide for examples, or inspect the hosted OpenAPI specification.

Build and contribute

The backend and web interface require the .NET 10 SDK.

dotnet restore Snacks.sln
dotnet test Snacks.sln
dotnet run --project Snacks/Snacks.csproj

Desktop packages use the Electron wrapper in electron-app/:

  • build-installer.bat builds the Windows installer.
  • build-mac.sh builds the Apple silicon DMG.
  • run-electron-dev.bat starts the Windows desktop development environment.

The build scripts package the backend, FFmpeg, and required runtime components into the desktop artifacts. See the repository's complete build and release guide for FFmpeg staging, Windows signing, macOS dylib bundling/notarization, Docker publishing, and release checks. The development and verification handbook contains the shorter day-to-day workflow.

Bug reports and focused pull requests are welcome through GitHub Issues.

Optional media server

Snacks can also stream your movies, shows, and music to the Snacks Player desktop app. It comes with profiles, households, PINs, parental controls, watch progress, adaptive quality, HDR passthrough or tone mapping, and subtitles.

  • Off by default: a transcoder-only install creates no media database and runs no media work. Transcoded output is the same whether the media server is on or off; while it is on, replacing or deleting a file someone is watching waits up to PlaybackLeaseWaitSeconds, and batch encodes may yield the CPU to playback (see the in-app guide).
  • Turning it on: use Settings → Media Server, or pin it with SNACKS_MEDIA_Enabled=true. Any other media setting can be pinned with SNACKS_MEDIA_<Property>.
  • Players use the same port as the web UI (6767) and are limited to the local network unless you allow remote players behind your own HTTPS proxy.
  • Docker: add docker-compose.media.yml, which pins the module on and maps a transcode-cache volume.
  • Unraid: use unraid/snacks-media-server.xml.
  • Seek thumbnails, motion previews and resume frames are made in the background on the CPU at the lowest priority (nice 19), one at a time, pausing while players need the encoders; they never touch the batch queue or its slots, and stay within their own disk limits (20 GB and 10 GB by default). Media Server → Now playing, History, Encoders and Background jobs show what plays, what played, how the encoders tested and what the background work does. See the in-app guide.
  • Cluster playback: cluster nodes can encode the media server's streams too, so a cluster serves many more simultaneous transcodes than one machine. Turn on Accept playback chunks on a node (off by default); batch encoding is unaffected, and a node never runs the media server itself. When a node freezes while a viewer waits on it, the master gives that video to another encoder instead of waiting out the node's timeouts. Upgrade the master and its nodes together. See the in-app guide.
  • Snacks Player is the desktop app for macOS, Windows, and Linux. Download it from the releases page, enter http://YOUR-SERVER-IP:6767, and sign in with a player account created under Media Server → Players & households. It shows a cinema-style Home with Continue watching and My list, and handles profiles and PINs, adaptive HDR playback with subtitles, and music.
  • Snacks for Fire TV is the TV app, for Amazon Fire TV (Fire OS 6 or later). On the Fire TV, turn on ADB debugging and Apps from Unknown Sources under Settings → My Fire TV → Developer options. Then install the APK from the releases page, either with adb connect <tv-ip>:5555 followed by adb install -r <apk>, or with the Downloader app and the APK's link. Open Snacks, enter http://YOUR-SERVER-IP:6767, and sign in with a player account.

The in-app guide documents every setting and API route.

Documentation and support

License

Snacks is available under the MIT License.

Locally hosted. Lightly toasted.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…