Presets and tuning
A preset is a set of encoder parameters that trades compression for speed. The presets form one
ladder, the same names for every codec: veryfast, faster, fast,
medium and slow, fastest first.
What the Default is
mediumis each codec's Default, and what an encode gets without--preset: the codec's own parameter defaults, with no overrides. It is the quality point of the ladder, tuned on low-delay real-time encodes for PSNR-YUV, VMAF and MS-SSIM in equal thirds.- The faster rungs switch off or narrow coding tools and searches, each one saving CPU for some compression. How much, per codec and machine, is on the speed results.
- The names are relative to our own Default for each codec: our
veryfastis not as fast as x264's, nor ourmediumas slow as x264's. slowis the quality-first rung: Default plus the work the Default limits for speed (a second reference, wider trellis and refinement searches), at a measured cost of about 1.5x Default's CPU for H.264, 1.6x for HEVC, 1.5x for AV1, 1.2x for VP9, 1.7x (Jetson) to 1.9x (PC) for AV2 and 1.2x for VVC (held-out clips, build bad14976). It stays real time and low delay: P frames only, no lookahead.
Which codec has which rung
Not every codec has every rung. As nanocodec params --codec C lists them:
With --scalability L2... or L3..., a rung uses the codec's parameter file tuned
for that many spatial layers where it has one.
Tuning beyond a preset
Every heuristic is a named parameter with a default and a range. Settings are applied in order, later ones
winning: the preset, --still-camera, --params FILE, --scalability,
then each --param NAME=VALUE:
nanocodec params --codec av1
prints each parameter as name default [min, max] what raising it trades. The C API takes
parameters as nc_param entries, the browser module as name=value lines. The presets
themselves are parameter files in the repository's
presets/ directory.