@mizchi/vlmkit-core 0.23.2 → 0.24.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/a11y-semantic.d.mts +7 -9
- package/dist/a11y-semantic.mjs +2 -2
- package/dist/animated-image.d.mts +29 -0
- package/dist/animated-image.mjs +113 -0
- package/dist/apng.d.mts +6 -8
- package/dist/apng.mjs +5 -5
- package/dist/arg-reader.d.mts +10 -11
- package/dist/auth-state.d.mts +7 -8
- package/dist/authored-style-capture.d.mts +8 -9
- package/dist/authored-style-diff.d.mts +7 -9
- package/dist/bitmap-font.d.mts +8 -9
- package/dist/browser-launch.d.mts +8 -10
- package/dist/cli-args.d.mts +9 -10
- package/dist/cli-error.d.mts +10 -11
- package/dist/cli-error.mjs +1 -1
- package/dist/computed-style-capture.d.mts +21 -22
- package/dist/computed-style-capture.mjs +3 -3
- package/dist/computed-style-diff.d.mts +8 -9
- package/dist/computed-style-diff.mjs +1 -1
- package/dist/diff-regions.d.mts +4 -6
- package/dist/dom-equivalence.d.mts +6 -7
- package/dist/dom-position-styles.d.mts +15 -14
- package/dist/dom-position-styles.mjs +3 -3
- package/dist/element-compare.d.mts +9 -8
- package/dist/element-compare.mjs +3 -2
- package/dist/filmstrip.d.mts +61 -8
- package/dist/filmstrip.mjs +82 -10
- package/dist/gate-config.d.mts +19 -21
- package/dist/gate-exit.d.mts +6 -7
- package/dist/gif.d.mts +43 -0
- package/dist/gif.mjs +74 -0
- package/dist/heatmap-regions.d.mts +5 -6
- package/dist/heatmap.d.mts +21 -15
- package/dist/heatmap.mjs +11 -3
- package/dist/image-resize.d.mts +9 -10
- package/dist/image-timing.d.mts +59 -0
- package/dist/image-timing.mjs +167 -0
- package/dist/index.d.mts +2 -2
- package/dist/mask.d.mts +6 -8
- package/dist/navigation-redirect.d.mts +2 -3
- package/dist/page-load.d.mts +12 -13
- package/dist/page-open.d.mts +12 -14
- package/dist/plugin/args.d.mts +17 -11
- package/dist/plugin/args.mjs +12 -1
- package/dist/plugin/cli-entry.d.mts +2 -3
- package/dist/plugin/contract.d.mts +18 -20
- package/dist/plugin/index.d.mts +3 -4
- package/dist/plugin/index.mjs +2 -2
- package/dist/plugin/load.d.mts +7 -9
- package/dist/plugin/registry.d.mts +9 -11
- package/dist/plugin/rule-prose.d.mts +5 -7
- package/dist/plugin/rule-tier.d.mts +8 -10
- package/dist/plugin/rules.d.mts +19 -21
- package/dist/plugin/runner.d.mts +19 -20
- package/dist/plugin/runner.mjs +43 -2
- package/dist/png-decode.d.mts +19 -0
- package/dist/png-decode.mjs +161 -0
- package/dist/png-utils.d.mts +8 -9
- package/dist/png-utils.mjs +2 -1
- package/dist/project-config.d.mts +8 -9
- package/dist/rect-overlap.d.mts +4 -5
- package/dist/region-shift.d.mts +3 -5
- package/dist/run-ledger.d.mts +11 -12
- package/dist/run-ledger.mjs +3 -2
- package/dist/stable-selector.d.mts +2 -3
- package/dist/terminal-colors.d.mts +9 -10
- package/dist/text-rows.d.mts +11 -12
- package/dist/types.d.mts +87 -62
- package/dist/version.d.mts +2 -3
- package/dist/version.mjs +1 -1
- package/dist/video-decode.d.mts +146 -0
- package/dist/video-decode.mjs +936 -0
- package/dist/video-frames.d.mts +306 -0
- package/dist/video-frames.mjs +565 -0
- package/dist/webp.d.mts +8 -10
- package/dist/webp.mjs +2 -1
- package/package.json +4 -4
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { ImageTiming } from "./image-timing.mjs";
|
|
2
|
+
import { FramesVideo } from "@mizchi/vlmkit-judge/frames.ts";
|
|
3
|
+
//#region src/video-frames.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Codecs whose decoded frames are what was encoded, bit for bit (modulo a chroma subsampling the
|
|
6
|
+
* encoder chose). Anything else is treated as lossy: x264 at `-qp 0` is lossless too, but nothing
|
|
7
|
+
* in the stream says so, so it is not claimed. (Apple's rpza is a 4x4 vector quantizer: lossy.)
|
|
8
|
+
*/
|
|
9
|
+
export declare const LOSSLESS_CODECS: ReadonlySet<string>;
|
|
10
|
+
/** A decoded frame of the stream: its position, when it is shown and whether it is a keyframe. */
|
|
11
|
+
export interface FrameRow {
|
|
12
|
+
/** Position among the frames the recording shows. */
|
|
13
|
+
index: number;
|
|
14
|
+
/** When it is shown, on the stream's own timeline (a stream that starts 1.25s in has its first frame at 1250). */
|
|
15
|
+
atMs: number;
|
|
16
|
+
key: boolean;
|
|
17
|
+
/** The GOP it was coded in, counted in decode order (`gopNumbers`), when the table had it. */
|
|
18
|
+
gop?: number;
|
|
19
|
+
/** Which decoded frame it is (its index in the decoder's output), when that differs from `index`. */
|
|
20
|
+
decoded?: number;
|
|
21
|
+
/** Interlaced: which field of the decoded frame (0 first in time). */
|
|
22
|
+
field?: 0 | 1;
|
|
23
|
+
}
|
|
24
|
+
/** One kept frame, with the instants that asked for it (`--at`). */
|
|
25
|
+
export interface ChosenFrame extends FrameRow {
|
|
26
|
+
instants?: number[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Which frames to keep, as asked: a span with no `toMs` runs to the end (a looping image's end is
|
|
30
|
+
* the frame on screen a pass and a second past `fromMs`: every window from there on repeats one
|
|
31
|
+
* before it). `scanVideo` records the end it reached in the manifest's `VideoSelection`.
|
|
32
|
+
*/
|
|
33
|
+
export type SelectionRequest = {
|
|
34
|
+
kind: "all";
|
|
35
|
+
} | {
|
|
36
|
+
kind: "span";
|
|
37
|
+
fromMs: number;
|
|
38
|
+
toMs?: number;
|
|
39
|
+
leadInMs?: number;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "at";
|
|
42
|
+
atMs: number[];
|
|
43
|
+
};
|
|
44
|
+
/** The frame on screen at `t`: the last one that began at or before it, or the first frame before any began. */
|
|
45
|
+
export declare function frameAt(rows: readonly FrameRow[], t: number): number;
|
|
46
|
+
/**
|
|
47
|
+
* The frames a selection keeps, in order. `span` keeps every frame on screen at some moment of
|
|
48
|
+
* [from, to]; `at` keeps the frame on screen at each instant, once, with the instants it answers.
|
|
49
|
+
*/
|
|
50
|
+
export declare function chooseFrames(rows: readonly FrameRow[], selection: SelectionRequest, endMs?: number): ChosenFrame[];
|
|
51
|
+
/**
|
|
52
|
+
* When the last frame leaves the screen: `endMs` when the stream says how long it is shown, else
|
|
53
|
+
* as long after it began as the gap before it (the rate it was shown at), or at once for one frame.
|
|
54
|
+
*/
|
|
55
|
+
export declare function recordingEndMs(rows: readonly FrameRow[], endMs?: number): number;
|
|
56
|
+
/** The largest side a recording is judged at, in CSS px: the judge keeps several arrays per CSS px. */
|
|
57
|
+
export declare const MAX_DISPLAY_PX = 4096;
|
|
58
|
+
/**
|
|
59
|
+
* How big the frames are shown, as the frames contract states it: the viewport in CSS px and the
|
|
60
|
+
* frame pixels per CSS px. A video has no page, so by default one frame pixel is one CSS pixel;
|
|
61
|
+
* `displayWidth` is the width it plays at (a 1920px recording in a 1280px player is 1.5 pixels per
|
|
62
|
+
* CSS px). `check flash` measures its 341x256 field and its area limit in those CSS px.
|
|
63
|
+
*/
|
|
64
|
+
export declare function displayGeometry(frame: {
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
}, displayWidth?: number): {
|
|
68
|
+
viewport: {
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
};
|
|
72
|
+
deviceScaleFactor: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The filters ffmpeg 6.1's own autorotate inserts for a stream's display matrix
|
|
76
|
+
* (`fftools/ffmpeg_filter.c`), for a chain that has to turn the frames itself — after splitting an
|
|
77
|
+
* interlaced frame into its fields, which autorotate would otherwise turn first (a quarter turn
|
|
78
|
+
* makes rows of columns, and a half turn reverses the field order). `[]` for none; null for a turn
|
|
79
|
+
* that is not a quarter one, which ffmpeg does with `rotate` and black corners.
|
|
80
|
+
*/
|
|
81
|
+
export declare function rotationFilters(stream: Pick<VideoStream, "rotation" | "displayMatrix">): string[] | null;
|
|
82
|
+
/** What ffprobe says about the one video stream that is decoded. */
|
|
83
|
+
export interface VideoStream {
|
|
84
|
+
/** The stream's index in the file (ffprobe's `index`), which `-map 0:<index>` names. */
|
|
85
|
+
index: number;
|
|
86
|
+
codec: string;
|
|
87
|
+
profile?: string;
|
|
88
|
+
pixelFormat: string;
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
/** `num:den`, absent when 1:1 or not stated. */
|
|
92
|
+
sampleAspect?: string;
|
|
93
|
+
/** Seconds per timestamp tick. */
|
|
94
|
+
timeBase: {
|
|
95
|
+
num: number;
|
|
96
|
+
den: number;
|
|
97
|
+
};
|
|
98
|
+
colorSpace?: string;
|
|
99
|
+
colorRange?: string;
|
|
100
|
+
colorTransfer?: string;
|
|
101
|
+
colorPrimaries?: string;
|
|
102
|
+
fieldOrder?: string;
|
|
103
|
+
/** Degrees, from the display matrix (side data) or the legacy `rotate` tag. */
|
|
104
|
+
rotation?: number;
|
|
105
|
+
/** The display matrix's nine entries (16.16 fixed point, row by row), when the stream has one. */
|
|
106
|
+
displayMatrix?: number[];
|
|
107
|
+
/** How long the stream says it lasts (its own duration, or Matroska's DURATION tag), in ms. */
|
|
108
|
+
durationMs?: number;
|
|
109
|
+
/** When the stream says it starts, in ms (its `start_time`). */
|
|
110
|
+
startMs?: number;
|
|
111
|
+
container?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The stream carries transparency: a pixel format with alpha, or a VP8/VP9 WebM whose
|
|
114
|
+
* `alpha_mode` tag says so (ffprobe reports those as plain yuv420p, and only libvpx decodes it).
|
|
115
|
+
*/
|
|
116
|
+
alpha?: "pixels" | "libvpx" | "libvpx-vp9";
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The video stream to decode from `ffprobe -show_streams -show_format -of json`: the one asked for
|
|
120
|
+
* by index, else not cover art (`attached_pic`), with a size, the default-disposition one first,
|
|
121
|
+
* then the largest. That is not ffmpeg's own choice — ffmpeg 6.1 takes a larger non-default stream
|
|
122
|
+
* over a smaller default one (measured) — but the stream a file marks as the one to play. It is mapped by its absolute index:
|
|
123
|
+
* `-map 0:v:0` is the first by index, which in an mkv can be a one-frame cover track. Refuses a
|
|
124
|
+
* file with none, listing what it holds.
|
|
125
|
+
*/
|
|
126
|
+
export declare function pickVideoStream(probeJson: string, file: string, wanted?: number): VideoStream;
|
|
127
|
+
/** A frame as ffprobe lists it, its timestamp still in ticks. */
|
|
128
|
+
export interface ProbedFrame {
|
|
129
|
+
index: number;
|
|
130
|
+
/** `best_effort_timestamp`, in the stream's time base: what ffmpeg itself gives a decoded frame as its pts. */
|
|
131
|
+
ticks: number;
|
|
132
|
+
key: boolean;
|
|
133
|
+
/** The decoder marked it interlaced (two fields woven into one frame). */
|
|
134
|
+
interlaced?: boolean;
|
|
135
|
+
/** Its top field is the first in time (the decoder's flag; meaningful when interlaced). */
|
|
136
|
+
topFieldFirst?: boolean;
|
|
137
|
+
/** Its decoded size, before rotation. */
|
|
138
|
+
width?: number;
|
|
139
|
+
height?: number;
|
|
140
|
+
/** How long it is shown, in the stream's time base, when the stream says (a packet duration). */
|
|
141
|
+
durationTicks?: number;
|
|
142
|
+
/** Where its packet is in the file (`pkt_pos`): packets are stored in decode order. */
|
|
143
|
+
pos?: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* `ffprobe -show_entries frame=best_effort_timestamp,key_frame,interlaced_frame -of json`: every
|
|
147
|
+
* decoded frame, in the order the decoder outputs them, which is the order they are shown. A frame
|
|
148
|
+
* without a timestamp cannot be placed and is refused; the order is checked by `videoTimeline`
|
|
149
|
+
* (a timestamp that goes back is refused, an equal one hides the frame before it).
|
|
150
|
+
*/
|
|
151
|
+
export declare function parseFrameTable(framesJson: string, file: string): ProbedFrame[];
|
|
152
|
+
/**
|
|
153
|
+
* Each decoded frame's GOP, in the order the frames are shown: counted in decode order, where a
|
|
154
|
+
* keyframe that follows a predicted frame begins one. Decode order is the packets' order in the
|
|
155
|
+
* file (`pkt_pos`), when every frame has one; otherwise the order they are shown, which differs
|
|
156
|
+
* only for an open GOP. There the B-frames shown just before a keyframe are decoded after it and
|
|
157
|
+
* predicted from it, so they carry its re-quantization (measured on x264 --open-gop: the frame
|
|
158
|
+
* shown 17ms before the keyframe stepped 42 levels on a still page, the keyframe 18 after it).
|
|
159
|
+
* A run of keyframes is one GOP: an intra-only codec codes a still picture the same every frame.
|
|
160
|
+
* Only keyframes shown one after another are a run: x264 --open-gop with a GOP no longer than its
|
|
161
|
+
* B-frames decodes the IDR and the next keyframe back to back, the B-frames shown between them
|
|
162
|
+
* after both, and counted as a run that keyframe was in GOP 0 — neither an opening nor a run as
|
|
163
|
+
* shown, so its re-quantization was a 55-frame transient that swallowed every caret blink in it.
|
|
164
|
+
*/
|
|
165
|
+
export declare function gopNumbers(frames: readonly ProbedFrame[]): number[];
|
|
166
|
+
/** What a recording shows, frame by frame, and what was done to the decoder's frames to get it. */
|
|
167
|
+
export interface StreamTimeline {
|
|
168
|
+
rows: FrameRow[];
|
|
169
|
+
/** Decoded frames never on screen: each shares its timestamp with the next, which replaces it at once. */
|
|
170
|
+
hidden: number;
|
|
171
|
+
/** A GIF / APNG: its frames held as a browser holds them, and looped as it loops. */
|
|
172
|
+
timing?: "browser";
|
|
173
|
+
loop?: {
|
|
174
|
+
plays: number | null;
|
|
175
|
+
passFrames: number;
|
|
176
|
+
passMs: number;
|
|
177
|
+
passes: number;
|
|
178
|
+
};
|
|
179
|
+
/** Interlaced: each split frame is two rows, its fields, at twice the frame rate. */
|
|
180
|
+
fields?: boolean;
|
|
181
|
+
/** How many decoded frames were split (a stream can mix progressive and interlaced frames). */
|
|
182
|
+
splitFrames?: number;
|
|
183
|
+
/** When the last frame leaves the screen, when the stream says how long it is shown. */
|
|
184
|
+
endMs?: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The frames a video shows, at their presentation times on the stream's own timeline — the one a
|
|
188
|
+
* browser's `video.currentTime` counts (measured: a video that starts 0.7s in shows frame 9 at
|
|
189
|
+
* 1.0s, not frame 30), so `--at 1s` is the frame a player shows at 1s. A frame is dropped when the
|
|
190
|
+
* next one begins at the same instant (the one on screen then is the later; measured:
|
|
191
|
+
* `-fps_mode passthrough` keeps both, and a recording with 0, 0, 0, 33, 33ms exists). Timestamps
|
|
192
|
+
* that go back are refused. A frame `split` says is interlaced is its two fields: the second
|
|
193
|
+
* halfway to the next frame, so a flicker at field rate is in the sequence (woven, it was a still
|
|
194
|
+
* comb, measured); a progressive one, in the same stream, is one row.
|
|
195
|
+
*/
|
|
196
|
+
export declare function videoTimeline(frames: readonly ProbedFrame[], timeBase: {
|
|
197
|
+
num: number;
|
|
198
|
+
den: number;
|
|
199
|
+
}, file: string, options?: {
|
|
200
|
+
split?: (frame: ProbedFrame) => boolean;
|
|
201
|
+
}): StreamTimeline;
|
|
202
|
+
/** Rows a looping image is unrolled to at most: past that, an instant is too far into the loop to write out. */
|
|
203
|
+
export declare const MAX_LOOP_ROWS = 100000;
|
|
204
|
+
/**
|
|
205
|
+
* The frames an animated GIF / APNG shows in a browser: each held for its stored delay, or 100ms
|
|
206
|
+
* when that is 10ms or less (Chromium 141 and 149, measured), and the animation repeated as the
|
|
207
|
+
* browser repeats it, as long as it plays. Unrolled up to `untilMs` — by default one pass and a
|
|
208
|
+
* second more, which holds every one-second window of a loop — so an instant or a span further on
|
|
209
|
+
* is the frame the loop has reached there, never the last one written. An APNG plays the frames
|
|
210
|
+
* its `acTL` declares, when it holds more (measured: Chromium never showed a third `fcTL` frame of
|
|
211
|
+
* an `acTL` saying two). Null when the file's own frame count is not the decoder's, or an APNG
|
|
212
|
+
* declares more than it holds.
|
|
213
|
+
*/
|
|
214
|
+
export declare function imageTimeline(decoded: readonly ProbedFrame[], timing: ImageTiming, untilMs?: number): StreamTimeline | null;
|
|
215
|
+
/** One `showinfo` line: the frame the filter graph handed on, as written. */
|
|
216
|
+
export interface ShowinfoFrame {
|
|
217
|
+
/** The instance's name (`showinfo@<name>`), when the graph named it. */
|
|
218
|
+
instance?: string;
|
|
219
|
+
n: number;
|
|
220
|
+
pts: number;
|
|
221
|
+
width: number;
|
|
222
|
+
height: number;
|
|
223
|
+
key?: boolean;
|
|
224
|
+
}
|
|
225
|
+
/** A line of ffmpeg's stderr: a showinfo frame, the time base showinfo counts in, or neither. */
|
|
226
|
+
export declare function parseShowinfoLine(line: string): {
|
|
227
|
+
frame: ShowinfoFrame;
|
|
228
|
+
} | {
|
|
229
|
+
timeBase: {
|
|
230
|
+
num: number;
|
|
231
|
+
den: number;
|
|
232
|
+
};
|
|
233
|
+
instance?: string;
|
|
234
|
+
} | null;
|
|
235
|
+
/** The matrices `--color-matrix` takes: swscale's own names. */
|
|
236
|
+
export declare const COLOR_MATRICES: readonly string[];
|
|
237
|
+
export interface ColorPlan {
|
|
238
|
+
/** `scale` options for the YUV to RGB step (matrix, range, and the rounding that holds them to ±1); empty for RGB frames. */
|
|
239
|
+
scale: string;
|
|
240
|
+
/**
|
|
241
|
+
* A filter before that step: luma-only frames become YUV with neutral chroma first, since
|
|
242
|
+
* swscale converts grey to RGB without applying a range (measured: limited 16 stayed 16).
|
|
243
|
+
*/
|
|
244
|
+
before?: string;
|
|
245
|
+
color: NonNullable<FramesVideo["color"]>;
|
|
246
|
+
/** What the conversion did not do, for the reader. */
|
|
247
|
+
notes: string[];
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The conversion to 8-bit sRGB, stated rather than left to the decoder's default (measured with
|
|
251
|
+
* ffmpeg 6.1, `docs/reports/2026-10-13-scan-video-v1.md`):
|
|
252
|
+
*
|
|
253
|
+
* - A tagged matrix and range are the stream's own word and are used.
|
|
254
|
+
* - An untagged matrix is BT.601, and an untagged range limited: ffmpeg's own default at every
|
|
255
|
+
* size, Chromium's for VP9 at every size, and what ffmpeg's encoder and Playwright's recordVideo
|
|
256
|
+
* write. Chrome guesses BT.709 for untagged H.264 from 720 lines up, and that guess misreads
|
|
257
|
+
* ffmpeg's default 720p output by 39 levels, so it is not copied. What was assumed is recorded,
|
|
258
|
+
* and `--color-matrix` / `--color-range` override it: a wrong matrix flipped a green strobe's
|
|
259
|
+
* verdict (ΔL 0.229 read as 0.019).
|
|
260
|
+
* - `accurate_rnd+full_chroma_int` holds tagged colours to ±1 level (0 on 10-bit); the default
|
|
261
|
+
* rounding errs by 2 to 3, and `accurate_rnd` alone by more.
|
|
262
|
+
* - An HDR transfer is refused: ffmpeg passes PQ and HLG code values through as if SDR.
|
|
263
|
+
*/
|
|
264
|
+
export declare function colorPlan(stream: VideoStream, file: string, override?: {
|
|
265
|
+
matrix?: string;
|
|
266
|
+
range?: "tv" | "pc";
|
|
267
|
+
}): ColorPlan;
|
|
268
|
+
/** What `-vf` does to each decoded frame, in order. Pure, so the chain is tested without ffmpeg. */
|
|
269
|
+
export interface FilterPlan {
|
|
270
|
+
/** `select='…'` on decoded indices, or null for every frame. */
|
|
271
|
+
select: string | null;
|
|
272
|
+
/** Split each frame into its two fields, each line-doubled back to the frame's height. */
|
|
273
|
+
fields: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* The fields' order, written onto the frames before the split, when the stream's tag decides it:
|
|
276
|
+
* `separatefields` reads each frame's own flag, and a codec that flags nothing says bottom first
|
|
277
|
+
* (measured: a tt-tagged utvideo ramp came out 97 0 162 134 …, its fields reversed).
|
|
278
|
+
*/
|
|
279
|
+
fieldOrder?: "tff" | "bff";
|
|
280
|
+
/** Each frame is one field (HEVC field pictures): line-double it to the picture's height, never split it. */
|
|
281
|
+
lineDouble?: boolean;
|
|
282
|
+
/** Turn the frames (after the field split), for a decode that runs with `-autorotate 0`. */
|
|
283
|
+
rotate?: readonly string[];
|
|
284
|
+
/** The showinfo instance's name, so two graphs in one run are told apart. */
|
|
285
|
+
name?: string;
|
|
286
|
+
color: ColorPlan;
|
|
287
|
+
/** Composite transparent pixels over this, not drop the alpha (which shows the colour under them). */
|
|
288
|
+
alpha?: {
|
|
289
|
+
background: "white" | "black";
|
|
290
|
+
};
|
|
291
|
+
/** Resample non-square pixels to square (in RGB, nearest: exact, no blended colours). */
|
|
292
|
+
sampleAspect: boolean;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* The filter chain. Measured, each step's place: `select` first (it counts decoded frames);
|
|
296
|
+
* fields split before the colour conversion, and the line-doubling's doubled sample aspect undone
|
|
297
|
+
* (`scale` keeps the display aspect, so an 8:9 field came out 16:9 and the frame twice as wide);
|
|
298
|
+
* then the turn, if the chain does it; alpha composited after the conversion, by premultiplying (over
|
|
299
|
+
* black) or by premultiplying the negative and negating back (over white), so every frame keeps its
|
|
300
|
+
* timestamp — an `overlay` on a colour source would take that source's constant rate; the SAR
|
|
301
|
+
* resample after RGB, nearest, since bicubic in YUV blended a red/blue edge into (197,0,52); the
|
|
302
|
+
* colour tags and an ICC profile stripped only after `format=rgb24` (before it, the matrix falls
|
|
303
|
+
* back to BT.601); and showinfo without its checksums, which doubled the cost of a 1080p decode.
|
|
304
|
+
*/
|
|
305
|
+
export declare function filterChain(plan: FilterPlan): string;
|
|
306
|
+
//#endregion
|