Repository navigation
Added
qc model report(qc model report corpus.jsonl --model model.json --to model.html): an HTML page showing what a ladder model is worth and
what its corpus holds, of either alone or of both. Findings tell whether
the model predicts without a probe and without any encode and how far
from a measured ladder, a model older than its corpus, unfinished
titles, and a grid that stops before the low rungs of its titles. Then
the error of each design, the error of each resolution and CRF of the
grid, the titles the model reads worst (the kinds of content to add),
the VMAF and the bitrate of the corpus as two surfaces in perspective
(drag to turn them, point at a corner, pick a title or play them all
against the mean), the mean rate-quality curve of each resolution, and
where the titles sit on each feature.qc model trainnow keeps the
validation error of each title in the model
(predict.Validation.Titles).- Ladder models (
qc model corpus,qc model train,qc ladder --ladder-model): a model trained on titles measured on a whole grid of
resolutions and CRFs completes the probes of a ladder. A build then
measures 4 to 10 encodes of the digest (the anchors) instead of 15 to 30
and predicts the others; the level correction, the rung selection and
the verification of every rung are unchanged. On a 59-minute title the
model had never seen (x264 fast, a model of two other titles), probing
went from 3 min 36 s to 52 s with the 10 anchors of the default tolerance
and to 37 s with 6 (--tolerance 0.8), and the whole build from
7 min 16 s to 3 min 28 s and 3 min 02 s, for the same rung resolutions
(but the last rung with 6) and verifications within 1.2 and 0.4 VMAF of
the predictions; with 4 anchors (--tolerance 1), without analysis nor
verification (--digest uniform --no-verify), 52 s instead of
2 min 57 s. Designs of anchors are fitted on digests of a few segments,
as the anchors of a build are measured: on a corpus of 39 titles the
error of four anchors went from 0.62 to 0.47 VMAF.
qc model trainvalidates every set of anchors by leaving each title of
the corpus out in turn and stores the errors in the model;--tolerance
picks the fewest anchors whose mean error is within it. A model is for
one codec and preset and one source height; a build it does not cover
falls back on fixed probing and says why. Library: packages
ladder/corpusandladder/predict,ladder.ProbingModel,
ladder.Options.Curves,Probe.Predicted,Result.ProbeEncodes. - Instant ladders (
qc ladder --ladder-model model.json --instant): a
ladder predicted from the analysis of the video, without any probe nor
verification, in about 4 s for titles of 10 minutes to 1 hour.qc model corpusnow also describes every segment (spatial and temporal
information, luma, camera motion, what x264 ultrafast spends on it at
360p and the VMAF of those two encodes, what scaling loses at each
resolution), andqc model trainfits and validates a design that
reads those features and no anchor. Its accuracy is that of its corpus,
and is reported with the ladder: with three titles, 1.2 VMAF and 8% of
the bitrate on average on a title never seen; verified, 4 rungs of 6
and 5 of 8 were right as predicted on two titles, and the two top rungs
of 8 on the third (CRFs 1.5 to 2 steps high below them). The model
predicts every segment of the digest and averages them: from the mean
features of the digest, bitrates came out 13% low on average on a
corpus of 39 titles (7% of error now, 14% then).
--probing predictedis the same prediction with the digest and the
verification of any build. Library: package
ladder/features,ladder.ProbingPredicted,ladder.WithFeatures,
encode.FFmpeg.StatsandScaleLoss.qc model corpustakes folders,
for every video under them. --plain(every command, orQC_PLAIN=1): the progress as plain
lines on stderr, one per event, in place of the live dashboard and of the
wizard: for containers, CI jobs and logs. Without it and without a
terminal, qc is silent until its report, as before.--quiet(every command, orQC_QUIET=1): no progress at all, in a
terminal either: with-f json, nothing but the JSON.qc model corpus --crf-count: the number of CRFs a corpus is
measured at, spread evenly over the codec's range (default: 11 for
H.264, as before).--tolerance(ladder,run): the VMAF error the curves may have
between probes, for adaptive probing and for ladder models (it was a
library option only).--no-encode(ladder,run, with--instantor--probing predicted): the digest is described without encoding anything, from
its frames and from the source's own encode, leaving out the two very
fast encodes a prediction otherwise scores. About 2 s instead of 4 for
an hour-long title, for about twice the error: 2.2 VMAF and 9.3% of the
bitrate on 40 titles never seen, against 1.2 and 6.4%. It never falls
back on probes: without a model that can, the build fails and says why
(ladder.ErrNoEncode). A model now
holds a design for each thing a build can read (qc model train
lists them); one trained before must be trained again for this mode.
Library:ladder.Options.NoEncode,features.Sets,features.Usable,
predict.TrainOptions.FeatureSets.
Changed
- Instant ladders are faster (12 s → 4 s for an hour-long title) and
read the source's own encode. Their digest is 20 s long, ten
segments, unless--digest-durationsays another (twenty segments:
7.5 s, for about a tenth less error: 1.0 against 1.1 VMAF and 8.8%
against 9.8% of bitrate on four titles). The
digest is cut from keyframes, a process per segment (nothing is decoded
before a segment;encode.DigestSpec.Fast); the two fast encodes are
scored on three frames spread evenly in each segment instead of three
clips of four drawn in it (half the frames, and no longer a draw;
quality.Sample.Even);
and the mean quantiser of the source, read while the digest is cut
(8-bit H.264,encode.DigestSpec.Quantisers), joins the features: 7.5%
→ 6.4% of bitrate error on 40 titles. The scale loss, which added
nothing, is no longer described (models trained with it still get it).
Corpora are described again byqc model corpus(features version 7,
the encodes of the grid are kept) and models trained again to read the
quantiser.predict.Model.DesignandInstanttake what tells the
features a build can read. - An instant ladder never encodes. It measured challenger probes
where its rungs needed CRFs past the grid of its model (six encodes and
44 s on an hour-long title in AV1, whose low rungs need CRF 60 to 62
when the grid stopped at 58); it now places those rungs on what the
model knows. The corpus grid of AV1 ends on CRF 63, the highest of
SVT-AV1, whose scale falls too fast at its end to be read from the
points before it: runqc model corpusagain on an AV1 corpus (five
encodes a title) and train again. - A ladder no longer inspects its source twice (
qc ladder,qc run):
1.5 s less for an hour of video. Library:
ladder.Engine.PrepareInspected,analysis.Options.SkipBitstream.
Docker
docker run --rm -v "$PWD:/data" ghcr.io/eko/qc:1.3.0 version --checkBinaries
Self-contained (libvmaf and the VMAF models are built in); ffmpeg is still
needed. Linux binaries are static; the macOS one is not signed
(install).