video-fps-probe 0.4.1 → 0.4.2
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/CHANGELOG.md +14 -0
- package/README.md +3 -2
- package/dist/engines/mediabunny.js +13 -4
- package/dist/engines/mp4box.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follo
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.4.2 - 2026-11-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A clean console in CI ([console](docs/api.md#console)). In Chromium, Firefox and WebKit the demo e2e, consumer and bundler smoke tests fail on a console warning or error of a page or a worker, any console output traced to the package, a page error, a crash, an unhandled rejection or a failed same-origin script request, unless the test names the noise it causes and why. In Node 24 and 22.12 every server entry, by `import`, by `require()` and from the CommonJS copy, must write nothing to stdout or stderr and emit no warning of its own (Node 22.12 prints its own `ExperimentalWarning` for `require()` of the ESM build, see [CommonJS](docs/api.md#commonjs)). Lint bans console calls in `src/`, and check-dist bans them in `dist/`.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- The mediabunny engine no longer lets mediabunny print an error when a log argument has no string form, such as an object without a prototype. The argument shows as its type in the `mediabunny log:` warning, and the mediabunny engine chunk grows by 0.01 KB.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- The docs name the log levels the mp4box and mediabunny engines set for the whole thread ([engines](docs/api.md#descriptors)), and the one `ExperimentalWarning` Node 22.12 prints for `require()` of the ESM build, which `--disable-warning=ExperimentalWarning` or a newer Node avoids ([CommonJS](docs/api.md#commonjs)).
|
|
20
|
+
|
|
7
21
|
## 0.4.1 - 2026-11-01
|
|
8
22
|
|
|
9
23
|
### Added
|
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ import { defineConfig } from 'vite';
|
|
|
156
156
|
export default defineConfig({ worker: { format: 'es' } });
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
Engines cost nothing until imported. Importing a descriptor grows the critical path a little, from 0.67 KB to 0.89 KB with mp4box or mediabunny, 0.77 KB with rVFC and 1.01 KB with all three, and the engine itself loads lazily: mp4box 44.95 KB, mediabunny 54.
|
|
159
|
+
Engines cost nothing until imported. Importing a descriptor grows the critical path a little, from 0.67 KB to 0.89 KB with mp4box or mediabunny, 0.77 KB with rVFC and 1.01 KB with all three, and the engine itself loads lazily: mp4box 44.95 KB, mediabunny 54.18 KB, rVFC 2.19 KB. Gzip -9 of production builds from the packed tarball, budgeted in CI. Every configuration is in [docs/benchmarks.md](docs/benchmarks.md#package-size).
|
|
160
160
|
|
|
161
161
|
`video-fps-probe/react` adds 1.20 KB to the critical path for the provider, `useVideoFps` and its store (React itself not counted), and its first analysis also fetches a 0.43 KB summary module, in parallel with the probe client. `video-fps-probe/check` adds 4.22 KB when imported statically, and nothing lazily. One preset from `video-fps-probe/presets` adds 0.46 KB.
|
|
162
162
|
|
|
@@ -176,11 +176,12 @@ Of the 168 committed fixtures, 156 are synthetic files made with ffmpeg and 12 a
|
|
|
176
176
|
|
|
177
177
|
Chrome and Edge 94, Firefox 114, Safari and iOS 15.4: floors derived from the features used, not tested on those versions; CI runs Chromium, Firefox and WebKit. mp4box.js needs Safari 16.4; rVFC needs `requestVideoFrameCallback` (Chrome 83, Firefox 132, Safari 15.4), a visible foreground tab and a playable codec. [Details](docs/benchmarks.md#browser-support).
|
|
178
178
|
|
|
179
|
+
The package writes nothing to the console. CI fails a browser test on a console warning or error of a page or a worker, a page error, an unhandled rejection or a failed script request, and a Node test on any output ([console](docs/api.md#console)).
|
|
180
|
+
|
|
179
181
|
Known limitations: [changelog](CHANGELOG.md#known-limitations), [benchmarks](docs/benchmarks.md#limitations). Development: [demo/README.md](demo/README.md), [scripts](docs/benchmarks.md#reproducing-the-numbers).
|
|
180
182
|
|
|
181
183
|
## Roadmap
|
|
182
184
|
|
|
183
|
-
- **0.4.2**: a CI guarantee of a clean console: the e2e and consumer smoke tests fail on any console warning or error, page error or unhandled rejection in Chromium, Firefox and WebKit, and a Node test checks that the library writes nothing to stdout or stderr.
|
|
184
185
|
- **Later in 0.4.x**: HDR10 static metadata (`mdcv`, `clli`, MasteringMetadata) and the color of the AV1 sequence header, which the color entry of 0.4.0 does not read yet.
|
|
185
186
|
- **0.5.0**: a Node entry (`fromPath`, DOM-free types, a `worker_threads` pool), NestJS validators, a CLI, bitrate, GOP and audio details, cadence detection, framework adapters for Vue, Svelte and Angular, and later MPEG-TS and HLS.
|
|
186
187
|
|
|
@@ -139,10 +139,19 @@ async function probe(counted, result, opts, t0) {
|
|
|
139
139
|
const unhandled = [];
|
|
140
140
|
const logged = [];
|
|
141
141
|
Logging.level = LogLevel.Silent;
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
const listen = (args) => {
|
|
143
|
+
logged.push(args
|
|
144
|
+
.map((arg) => {
|
|
145
|
+
try {
|
|
146
|
+
return String(arg);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return typeof arg;
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
.join(' '));
|
|
153
|
+
};
|
|
154
|
+
const unlisten = [Logging.on('warn', listen), Logging.on('error', listen)];
|
|
146
155
|
const source = new CustomSource({
|
|
147
156
|
getSize: () => counted.size,
|
|
148
157
|
read: async (start, end) => {
|
package/dist/engines/mp4box.js
CHANGED
|
@@ -13,7 +13,7 @@ const MDAT_PEEK = 16;
|
|
|
13
13
|
const HEADER_PROBE = 32;
|
|
14
14
|
const logSinks = new Set();
|
|
15
15
|
let logHooked = false;
|
|
16
|
-
// mp4box prints parse errors
|
|
16
|
+
// mp4box prints parse errors to the console through Log.error and offers no switch to silence them.
|
|
17
17
|
function hookLog() {
|
|
18
18
|
if (logHooked)
|
|
19
19
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "video-fps-probe",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"description": "Video frame rate, frame count and VFR detection from MP4/MOV/WebM/MKV container headers in a Web Worker. Matches ffprobe 8.1.1 on the test corpus (0 mismatches), no decoding.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|