@gentbajko/slopify 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension/slopify-studio-chrome.zip +0 -0
- package/dist/extension/slopify-studio-firefox.zip +0 -0
- package/dist/main.js +12 -3
- package/dist/patch-notes/4.5.0.md +20 -0
- package/dist/patch-notes/index.json +6 -0
- package/dist/slices/admission/schema.js +3 -1
- package/dist/slices/rebuild/recipe-edit.js +8 -1
- package/dist/slices/rebuild/runtime-export.js +4 -3
- package/dist/slices/video/edit-settings.js +17 -0
- package/dist/slices/video/encoder-probe.js +124 -0
- package/dist/slices/video/encoding.js +143 -91
- package/dist/slices/video/ffmpeg.js +4 -2
- package/dist/slices/video/slideshow.js +32 -8
- package/dist/tutorials/Create-Video-and-Style.md +13 -0
- package/dist/tutorials/Settings-Reference.md +2 -0
- package/dist/tutorials/Video-Editing.md +4 -0
- package/dist/web/assets/index-hN_yzSRs.js +460 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/index-CA_I2trg.js +0 -460
|
@@ -5,7 +5,7 @@ import { masterFile, masterReport } from "../loudness/loudnorm.js";
|
|
|
5
5
|
import { cardsAss } from "./cards.js";
|
|
6
6
|
import { cacheKey, contentIdentity, fileIdentity, keepClip, pruneClips, reuseClip, } from "./clip-cache.js";
|
|
7
7
|
import { captionedClips, drawsOwnCaptions, readCaptions, } from "./clip-captions.js";
|
|
8
|
-
import { defaultEncode, nvencFallbackNotice, } from "./encoding.js";
|
|
8
|
+
import { defaultEncode, encoderBin, nvencFallbackNotice, svtav1FallbackNotice, } from "./encoding.js";
|
|
9
9
|
import { audioMixArgs, burnPartArgs, concatList, joinArgs, runFfmpeg, segmentArgs, slideshowClips, } from "./ffmpeg.js";
|
|
10
10
|
import { cardsIn } from "./look.js";
|
|
11
11
|
import { inPool, renderJobs } from "./pool.js";
|
|
@@ -20,11 +20,30 @@ const captionFonts = "caption-fonts";
|
|
|
20
20
|
const leastPartFrames = 60 * 30;
|
|
21
21
|
// The sound the join plays, as the join itself brings every segment to it.
|
|
22
22
|
const masterFormat = { sampleRate: 44100, channels: 2 };
|
|
23
|
-
// What the master measured, when the run asked for one. A render
|
|
24
|
-
// for any reason but a cancel is made again on the
|
|
23
|
+
// What the master measured, when the run asked for one. A render in the computer's own ffmpeg
|
|
24
|
+
// (the NVIDIA card, SVT-AV1) that fails for any reason but a cancel is made again on the
|
|
25
|
+
// processor with the bundled one: neither ever fails a render. The card's HEVC falls back to
|
|
26
|
+
// x265; its AV1, like SVT-AV1's, to H.264, since the processor's AV1 needs that same ffmpeg.
|
|
25
27
|
export async function renderSlideshow(run) {
|
|
26
28
|
const encode = run.machine?.encode ?? defaultEncode;
|
|
27
|
-
|
|
29
|
+
const fallback = run.machine?.fallback;
|
|
30
|
+
// Automatic's card AV1: today's H.264 render takes over, without a notice, which keeps its
|
|
31
|
+
// own way of recovering from a card that fails.
|
|
32
|
+
if (fallback !== undefined && run.machine !== undefined) {
|
|
33
|
+
try {
|
|
34
|
+
return await renderWith(run, encode);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
if (run.signal.aborted)
|
|
38
|
+
throw error;
|
|
39
|
+
run.log.write("warn", "video.encoder", {
|
|
40
|
+
detail: `the automatic AV1 render on the card failed; rendering H.264 as before: ${errorText(error)}`,
|
|
41
|
+
});
|
|
42
|
+
const { fallback: _used, ...machine } = run.machine;
|
|
43
|
+
return renderSlideshow({ ...run, machine: { ...machine, encode: fallback } });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (encode.kind !== "nvenc" && encode.kind !== "svtav1")
|
|
28
47
|
return renderWith(run, encode);
|
|
29
48
|
try {
|
|
30
49
|
return await renderWith(run, encode);
|
|
@@ -33,18 +52,23 @@ export async function renderSlideshow(run) {
|
|
|
33
52
|
if (run.signal.aborted)
|
|
34
53
|
throw error;
|
|
35
54
|
const detail = errorText(error);
|
|
55
|
+
const card = encode.kind === "nvenc";
|
|
36
56
|
run.log.write("warn", "video.encoder", {
|
|
37
|
-
detail: `the NVENC render failed; rendering again on the processor: ${detail}`,
|
|
57
|
+
detail: `the ${card ? "NVENC" : "SVT-AV1"} render failed; rendering again on the processor: ${detail}`,
|
|
58
|
+
});
|
|
59
|
+
const why = `it stopped the render: ${detail}`;
|
|
60
|
+
run.notice?.(card ? nvencFallbackNotice(why) : svtav1FallbackNotice(why));
|
|
61
|
+
return renderWith(run, {
|
|
62
|
+
kind: card && encode.codec === "hevc" ? "x265" : "x264",
|
|
63
|
+
clipSpeed: encode.clipSpeed,
|
|
38
64
|
});
|
|
39
|
-
run.notice?.(nvencFallbackNotice(`it stopped the render: ${detail}`));
|
|
40
|
-
return renderWith(run, { kind: "x264", clipSpeed: encode.clipSpeed });
|
|
41
65
|
}
|
|
42
66
|
}
|
|
43
67
|
async function renderWith(run, encode) {
|
|
44
68
|
const { edit } = run;
|
|
45
69
|
const priority = run.machine?.priority;
|
|
46
70
|
// The ffmpeg that encodes the picture; copying, sound and probing stay with the bundled one.
|
|
47
|
-
const encoder = encode
|
|
71
|
+
const encoder = encoderBin(encode, run.bin);
|
|
48
72
|
const distinct = slideshowClips(edit);
|
|
49
73
|
// Captions are burned in one of two ways (`clip-captions.ts`): drawn by each clip's own run,
|
|
50
74
|
// or over the joined clips in a second encode.
|
|
@@ -63,6 +63,19 @@ After the run, you can fix a misheard word or nudge a caption's timing on the pr
|
|
|
63
63
|
|
|
64
64
|
Turning on **More images for long videos** in the Images row switches **Motion** from Zoom to **Mix of both**. See [Images](Create-Images#more-images-for-long-videos).
|
|
65
65
|
|
|
66
|
+
## Video codec
|
|
67
|
+
|
|
68
|
+
**Video codec** sits beside **Cuts** and decides the format of the finished video file. It is saved with the project or template.
|
|
69
|
+
|
|
70
|
+
| Choice | What it does |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| **Automatic (AV1 on the graphics card, else H.264)** | The default, and what a project without the setting gets. AV1 encoded on the NVIDIA card whenever the card can encode AV1 (RTX 40 series and newer), whatever **Video encoder** says in Settings: about 44% of the H.264 file for the same picture. Without such a card the video is H.264 exactly as before, made by the Video encoder you chose, and nothing is said about it. If the card's AV1 fails mid-render, the video is made again the old way. |
|
|
73
|
+
| **H.264** | Works everywhere: every player, browser and upload site. Always H.264, as every video was before, never AV1. |
|
|
74
|
+
| **HEVC** | About half to three fifths of the file for the same picture. On the processor it is x265, from Slopify's own ffmpeg; on an NVIDIA card, the card's HEVC encoder. |
|
|
75
|
+
| **AV1** | The smallest file: about 29% of the H.264 one on the processor, about 44% on an NVIDIA card, for the same picture (measured on a 1080p video). On the processor it needs an ffmpeg with SVT-AV1 on the computer (the `ffmpeg` on your `PATH` or `/usr/bin/ffmpeg`) and renders slower. |
|
|
76
|
+
|
|
77
|
+
For the explicit choices, whether the processor or the NVIDIA card encodes it is **Settings → Production defaults → Video encoder**. If AV1 is chosen and no ffmpeg with SVT-AV1 is found, or the card can't encode the chosen codec, the video is made as H.264 and its Video part says why; the video is never failed for it. Shorts and the style preview are always H.264. Choosing HEVC or AV1 makes only the video again; Automatic and H.264 leave a finished video current, and it comes out AV1 the next time it is made where the card allows.
|
|
78
|
+
|
|
66
79
|
## The Look
|
|
67
80
|
|
|
68
81
|
**Look** is a fold in the row. Folded, its line lists what is on (for example **Crossfade 2 s · Warm fantasy · Fog · Vignette**). Everything in it is drawn on this computer at no cost; only animated images are charged, by the image service.
|
|
@@ -121,6 +121,8 @@ The volume fields show only while the switch is on. A project keeps what it star
|
|
|
121
121
|
|
|
122
122
|
What they cost and give, measured on the first 24 images (11.5 minutes) of a real project with captions in the video, each image shown once (16-core processor, RTX 5080): **Thorough** took 83 seconds; **Fast** took 69, a sixth less, for a slightly softer picture (1.2 VMAF less) and a file a sixth smaller. **NVIDIA** took 42 seconds, half the waiting (the zoom and pan on each image still runs on the processor), but with a visibly softer picture than x264 (about 2.5 VMAF less at the same file size, measured in 4.0): pick it when the time matters more than the last bit of sharpness. In a video whose images come round again, Fast cut the waiting by a fifth as well (118 seconds against 145) for 0.7 VMAF less. **Background** makes no difference to the file at all.
|
|
123
123
|
|
|
124
|
+
A project's **Video codec** (in its Video settings) is **Automatic** unless set: AV1 on the NVIDIA card whenever the card can encode it, even with Processor chosen here, and otherwise H.264 through this setting exactly as before. Its explicit choices (H.264, HEVC or AV1) combine with the Video encoder: HEVC is x265 on the processor and the card's HEVC encoder on NVIDIA; AV1 is SVT-AV1 from the computer's own ffmpeg on the processor and the card's AV1 encoder on NVIDIA. Without an ffmpeg with SVT-AV1, or on a card that can't encode the codec, the video is made as H.264 and the project's Video part says so.
|
|
125
|
+
|
|
124
126
|
If the NVIDIA encoder is chosen but stops working (a driver update, the card busy elsewhere), the video is encoded on the processor instead, never failed, and the project's Video part says so, with the reason and where to change it. Slopify checks for the card once per start; restart Slopify after installing a driver or an ffmpeg with NVENC.
|
|
125
127
|
|
|
126
128
|
Agents read and change these with `get_settings` and `update_settings`, and check the card with `get_video_encoders`.
|
|
@@ -31,6 +31,10 @@ Motion takes turns so a long video stays watchable. Zoom goes in, out, in. Pan g
|
|
|
31
31
|
|
|
32
32
|
New projects default to **Follow the narration**. It needs word timing, so it works in English and the languages that have it; in other languages the picker is fixed to Every N seconds and a note says why. See [Other Languages](Other-Languages).
|
|
33
33
|
|
|
34
|
+
## Video codec
|
|
35
|
+
|
|
36
|
+
**Video codec** sits under Cuts: **Automatic (AV1 on the graphics card, else H.264)**, the default, or **H.264** (works everywhere), **HEVC** or **AV1**. Automatic encodes AV1 on an NVIDIA card that can (whatever the Video encoder setting says), and otherwise H.264 exactly as before, without a note. HEVC and AV1 make about half to a third of the file for the same picture; AV1 on the processor needs an ffmpeg with SVT-AV1 on the computer and renders slower. The explicit choices combine with **Settings → Production defaults → Video encoder**, and fall back to H.264 with a note in the Video part when the computer can't encode them. Choosing HEVC or AV1 outdates only the video; Automatic and H.264 outdate nothing. Shorts stay H.264. See [Video and style](Create-Video-and-Style#video-codec).
|
|
37
|
+
|
|
34
38
|
## The Look
|
|
35
39
|
|
|
36
40
|
**Look** is a folding row under Cuts. Its summary line lists what is on, or "Plain cuts, no effects".
|