Hardware acceleration
Video encoding is the one thing in a media server that can make a computer sweat. Hardware encoders turn a job that takes a CPU minutes into one a GPU does in seconds, at a small cost in quality per bit. Naelox and Allspark use them whenever they are there, and tell you when they are not.
Detection
Section titled “Detection”At start, a worker looks for what it can use:
- VAAPI on Linux: every render node under
/dev/driis listed, labelled from the kernel (vendor, device id, driver), and probed for H.264 and 10-bit HEVC encoding, constant-quality rate control, OpenCL tone mapping, and the codecs it decodes. A node that cannot encode H.264 is listed as unusable. - Quick Sync and NVENC are detected through ffmpeg’s encoder list on workers built with them.
- VideoToolbox on Macs.
The result is reported in the worker’s status and shown in Workers and Allspark’s Fleet page, so you can see what each computer offers before any job runs.
Choosing
Section titled “Choosing”Settings → Transcoder gives each connected worker a choice: software, or one of its usable GPUs. A worker without a choice uses its default device when that is usable and software otherwise. The choice is pushed to the worker and takes effect without a restart: new streams use the new device, and streams already running finish on the one they started on. A choice the worker cannot honour (a missing or unusable node) falls back to its default and shows the reason.
Planning
Section titled “Planning”The server plans every rendition ladder from the chosen device’s capabilities. Software and GPUs without 10-bit HEVC get no HEVC or HDR renditions; they get tone-mapped H.264 instead. HDR tone mapping runs through OpenCL when the worker has it, so the GPU does the colour work too.
Limits and pressure
Section titled “Limits and pressure”Each worker has a GPU transcode limit and a CPU transcode limit. Past the GPU limit, H.264 transcodes move to software; past both, the worker declines and the server places the stream elsewhere. Workers report CPU, IO wait, load and weighted transcode slots (a 4K transcode counts 1.0, 1080p 0.4, smaller 0.2, tone mapping adds 0.25, a stream copy 0.05), and the server smooths that into a pressure score with hysteresis. Background jobs reserve part of a slot each and only run on workers that are not under pressure, with room kept for 4K playback across the fleet.
A transcoded stream holds a viewer slot while it plays. If an Allspark encode or a preview render holds the slot a viewer needs, it pauses until the viewer leaves, then resumes where it stopped. Watching always wins over background work.
When software is right
Section titled “When software is right”Hardware encoders trade a little quality per bit for speed. For renditions served on the fly, that trade is right every time. For an Allspark rule that makes a permanent copy you will keep for years, you may prefer software at a slower pace; turn hardware off on that rule. The original is never touched either way until the copy is verified.