Snacks v2.2.0
Automated Video Library Encoder
Major release adding distributed encoding across multiple Snacks instances. Nodes on the local network discover each other automatically and a coordinator distributes encoding work to available workers.
What's New
Distributed Encoding Cluster
- Automatic node discovery -- Snacks instances on the local network find each other automatically using configurable discovery. No manual IP entry required.
- Coordinator/worker architecture -- one instance acts as the coordinator, assigning encoding jobs to available worker nodes based on capacity.
- Remote job scheduling -- the coordinator tracks job assignments, monitors progress on remote nodes, and handles completion/failure across the cluster.
- File transfer -- source files are transferred to worker nodes before encoding and results are transferred back on completion. Transfers are resumable and validated.
- Shared-secret authentication -- all inter-node API traffic is secured with a shared secret via
ClusterAuthMiddleware. - State transition tracking -- new
StateTransitionsdatabase table records job lifecycle events (queued, assigned, transferring, encoding, completed, failed) for observability and debugging.
Cluster Settings UI
- Cluster settings panel -- new section in the settings modal for enabling/disabling clustering, setting the shared secret, and configuring discovery.
- Node monitoring -- live view of discovered nodes with status, active jobs, and health indicators in the transcoding UI.
- Real-time cluster updates -- SignalR hub extended with cluster events for node status changes and remote job progress.
Resilience Improvements
- Job reassignment on node failure -- if a worker node goes offline mid-encode, the coordinator detects the failure and reassigns the job to another available node.
- Transfer retry logic -- file transfers retry with backoff on network errors instead of immediately failing the job.
- Edge case protections -- guards against duplicate job assignments, stale node registrations, and race conditions during concurrent job completion.
- Completed job cleanup -- worker nodes now properly clean up local files and state after completing a remote job.
Bug Fixes
- Fixed nodes not cleaning up completed jobs, leaving stale files on disk.
- Fixed path fallback logic when resolving files across nodes with different mount points.
- Fixed UI flickering on node status items in the transcoding view.
- General stability fixes across auto-scan, ffprobe, transcoding, and cluster services.
Deployment
NAS (Docker)
docker pull derekshreds/snacks-docker:latestTo run a multi-node cluster, deploy Snacks on each machine and ensure they can reach each other on the network. Configure a shared secret in the cluster settings on each instance.
volumes:
- /share/CACHEDEV1_DATA/snacks/config:/app/work/config
- /share/CACHEDEV1_DATA/snacks/logs:/app/work/logsWindows Desktop
Download the installer from the Releases page, or build from source:
build-installer.batThe Electron installer now includes custom NSIS hooks for Windows firewall rules needed by cluster communication.
Database Migrations
Three new migrations are included and run automatically on startup:
AddRemoteJobColumns-- adds remote node tracking columns to work items (assigned node, remote status, transfer state)AddRemoteWorkItemId-- links local work item IDs to their remote counterparts on worker nodesAddStateTransitionsTable-- new table recording timestamped state transitions for every job
Files Changed
New Files
Snacks/Services/ClusterService.cs-- coordinator logic for job distribution, node health monitoring, and cluster orchestrationSnacks/Services/ClusterDiscoveryService.cs-- automatic node discovery and registrationSnacks/Services/ClusterFileTransferService.cs-- file transfer between coordinator and worker nodesSnacks/Services/ClusterNodeJobService.cs-- worker-side job execution and status reportingSnacks/Services/ClusterAuthMiddleware.cs-- shared-secret authentication for inter-node API callsSnacks/Services/StateTransitionService.cs-- records job state transitions to the databaseSnacks/Controllers/ClusterController.cs-- API endpoints for node registration, job assignment, file transfer, and statusSnacks/Models/ClusterConfig.cs-- cluster configuration model persisted to diskSnacks/Models/ClusterNode.cs-- in-memory representation of a discovered cluster nodeSnacks/Models/JobAssignment.cs-- tracks which job is assigned to which nodeSnacks/Models/JobMetadata.cs-- metadata attached to remote job assignmentsSnacks/Models/PendingCompletion.cs-- tracks jobs awaiting file transfer back from workersSnacks/Models/StateTransition.cs-- database entity for state transition recordsSnacks/Views/Shared/_ClusterSettings.cshtml-- cluster settings partial viewSnacks/Data/Migrations/20260403122458_AddRemoteJobColumns.csSnacks/Data/Migrations/20260403124639_AddRemoteWorkItemId.csSnacks/Data/Migrations/20260403164245_AddStateTransitionsTable.cselectron-app/installer.nsh-- custom NSIS installer hooks
Modified Files
Snacks/Services/TranscodingService.cs-- integration with cluster job service, remote job completion handlingSnacks/Services/AutoScanService.cs-- cluster-aware scanning and queue managementSnacks/Services/FfprobeService.cs-- enhanced probe result handling for remote filesSnacks/Services/FileService.cs-- file operation updates for cluster file pathsSnacks/Controllers/HomeController.cs-- cluster settings endpoints, node status APIsSnacks/Data/MediaFileRepository.cs-- queries for remote job tracking columnsSnacks/Data/SnacksDbContext.cs-- StateTransition entity registration, new indexesSnacks/Hubs/TranscodingHub.cs-- cluster event broadcastingSnacks/Models/MediaFile.cs-- remote job columnsSnacks/Models/WorkItem.cs-- remote work item ID, cluster status fieldsSnacks/Models/EncoderOptions.cs-- documentation updatesSnacks/Models/AutoScanConfig.cs-- documentation updatesSnacks/Models/ProbeResult.cs-- expanded probe result propertiesSnacks/Program.cs-- cluster service registration and middleware pipelineSnacks/Views/Home/Index.cshtml-- cluster node display in UISnacks/Views/Shared/_Layout.cshtml-- cluster settings partial inclusionSnacks/wwwroot/js/transcoding.js-- cluster node monitoring, remote job progress displaySnacks/wwwroot/js/site.js-- cluster settings save/loadSnacks/wwwroot/css/site.css-- cluster node status stylingSnacks/appsettings.json-- cluster configuration defaultsSnacks/appsettings.Development.json-- development cluster settingsdocker-compose.yml-- cluster networkingelectron-app/main.js-- cluster-related Electron updateselectron-app/package.json-- version bump to 2.2.0
Full documentation: README.md