diff --git a/content/en/vector-video.md b/content/en/vector-video.md index 6843697..0b75011 100644 --- a/content/en/vector-video.md +++ b/content/en/vector-video.md @@ -7,7 +7,7 @@ weight: 17 Can a video be turned into vector paths and beat a codec? For one kind of content perhaps; for camera video, no. This page gives the measured figures from the study, and -[`go-avkit/vectorbench`](https://github.com/go-avkit/vectorbench) (v0.1.0) is the tool +[`go-avkit/vectorbench`](https://github.com/go-avkit/vectorbench) (v0.1.1) is the tool that repeats the measurement with pinned versions. ## What was measured {#measured} @@ -17,9 +17,9 @@ side: x264 and x265 (`-preset slow`), SVT-AV1 (`-preset 4`), libvpx-vp9. Vector VTracer 0.6.5 run frame by frame, the SVGs rendered back by resvg. Quality is PSNR and VMAF against the source. Size is the video file, or the sum of the SVGs. -Every figure below is **measured** unless marked otherwise. The study run took **no -timings**: the machine was at a load of about 97. Encode and vectorise times are the job -of `vectorbench run` on a quiet host and are not in this table. +Every figure below is **measured** unless marked otherwise. This size study ran on a +loaded machine (load about 97) and took **no timings**; the timings are in a second, +separate run on a quiet host, described in [Timings](#timings). | Clip | Best trace (PSNR / VMAF) | SVG bytes per frame | Codec of higher PSNR | Bytes per frame | SVG / codec | |---|---|---:|---|---:|---:| @@ -59,6 +59,53 @@ load in `results.json`. The report labels each number measured, estimated (inter between the two measured settings that bracket the target quality), a bound, or n/a. It also gives a flicker proxy: how many paths change between consecutive frames. -Timings on the reference host are not published yet. The tool refuses to time anything -when the one-minute load is above its limit, unless a waiver reason is given, and the -waiver is written into the results. +The tool refuses to time anything when the one-minute load is above its limit, unless a +waiver reason is given, and the waiver is written into the results. + +## Timings {#timings} + +Published run: `vectorbench` v0.1.1, nine clips (the six above plus the screen recordings +Debugging and MissionControlClip3 and the 1080p50 camera clip crowd_run), 24 frames each, +on host `fractal` (Linux amd64), the process pinned to one core (`taskset -c 9`), +one-minute load 1.77 at the start and 2.05 at the end (limit 8). Encoders: Ubuntu ffmpeg +6.1.1 (x264, x265, SVT-AV1 1.7.0, libvpx-vp9); PSNR and VMAF: a static ffmpeg 7.0.2 with +libvmaf. VTracer 0.6.5 and resvg 0.50.0. The tool hashes and the raw results are in +[`results/fractal-core9.json`](https://github.com/go-avkit/vectorbench/blob/main/results/fractal-core9.json) +and the full tables in +[`results/fractal-core9.md`](https://github.com/go-avkit/vectorbench/blob/main/results/fractal-core9.md). + +Encode time is the wall time of the encoder for the 24 frames, in seconds, at the +mid-quality setting of each codec. VTracer is the default preset, in seconds per frame +(multiply by 24 to compare). All **measured**, one run each. + +| Clip | x264 crf 23 | x265 crf 23 | SVT-AV1 crf 45 | VP9 crf 50 | VTracer, s per frame | +|---|---:|---:|---:|---:|---:| +| GlassHalf, cartoon 1080p | 1.2 | 0.9 | 14.2 | 6.2 | 0.85 | +| SolLevanteFace, anime 1080p | 3.7 | 1.4 | 38.2 | 9.6 | 2.40 | +| Wikipedia, screen 1080p | 0.6 | 0.6 | 16.6 | 3.4 | 0.82 | +| Slides1, screen 1080p | 0.9 | 0.8 | 13.4 | 4.9 | 0.83 | +| Debugging, screen 1080p | 0.6 | 0.6 | 17.7 | 4.2 | 0.69 | +| MissionControlClip3, screen 1080p | 1.0 | 0.8 | 29.0 | 4.4 | 1.87 | +| KristenAndSara, camera 720p | 0.5 | 0.5 | 7.0 | 1.6 | 0.54 | +| in_to_tree, camera 720p | 0.9 | 0.6 | 11.8 | 1.9 | 2.64 | +| crowd_run, camera 1080p | 3.2 | 1.6 | 67.8 | 11.5 | 11.76 | + +Tracing 24 frames takes 13 to 282 seconds, against 0.5 to 4 seconds for x264 and x265 +and 7 to 68 seconds for SVT-AV1 at this preset. Vectorising is therefore slower than the +fast codecs by one to two orders of magnitude and comparable to the slowest AV1 setting, +for a result that is larger and further from the source. + +The same run gives the size comparison at matched VMAF. The ratio is the size of the +trace divided by the size of the best codec at the same VMAF (plain SVG; the codec size +is **estimated** by interpolation, or a bound where marked in the full tables), over +every clip and VTracer setting of the class: + +| Class | Comparisons | Smallest | Median | Largest | +|---|---:|---:|---:|---:| +| anime | 4 | 18x | 625x | 1061x | +| cartoon | 4 | 141x | 612x | 952x | +| natural | 12 | 114x | 2164x | 6478x | +| screen | 16 | 37x | 534x | 3429x | + +Even the coarsest trace is at least 18 times larger than a codec at its quality; the +conclusion above stands on nine clips.