@milkstraw/traceframe 0.6.2 → 0.6.3

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/README.md CHANGED
@@ -61,7 +61,7 @@ The cursor and click pulses are always drawn at the full frame rate. Chromium ma
61
61
 
62
62
  Use `--capture-diagnostics` (`captureDiagnostics: true` with `record` or `recordPage`) to include `captureStats` in the result. It reports received frames, their timestamp span and rate, the largest forward timestamp jumps and delivery gaps, and out-of-order timestamps. `lateFrames` counts frames older than the first received frame or the last written frame; `overflowFrames` counts frames dropped at the 64 MiB capture-buffer limit, and `maxBufferedBytes` reports its peak use. `writeWaitMs` and `maxWriteWaitMs` measure total and maximum time waiting for frame-write callbacks, including the final static frame; they do not measure durable disk writes. Slow writes can delay frame acknowledgments and reduce what Chromium sends, even when the writer drop counters stay at zero. These measurements describe frames delivered by Chromium. They do not count distinct pictures or prove smoothness; a static page legitimately delivers few frames, and a 30 FPS video cannot supply 60 distinct source frames per second.
63
63
 
64
- `--capture-quality <1–100>` (`captureQuality` in either API) controls the JPEG frames exported by Chromium; the default remains 95. A lower setting such as 80 can reduce frame-export and transfer cost, with a loss of image detail. This is separate from the final MP4 encoder. Check representative moving content and text at the intended resolution before choosing it.
64
+ `--capture-quality <1–100>` (`captureQuality` in either API) controls the JPEG frames exported by Chromium; the default is 85. In 3024 × 1964 tests, 85 made captured frames about a third smaller than 95, with slightly lower CPU use and no visible difference in the exported MP4. Quality did not change how many frames Chromium captured. Use 95 for maximum detail, or a lower setting such as 75 for smaller temporary captures with softer fine detail. This is separate from the final MP4 encoder. Check representative moving content and text at the intended resolution before choosing a non-default value.
65
65
 
66
66
  Since v0.6.0, the retained raw file is `capture.mkv` instead of `capture.webm`; update scripts that inspect it. Final output remains MP4.
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milkstraw/traceframe",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Record scripted browser flows and render smooth cursor overlays into video.",
5
5
  "keywords": [
6
6
  "playwright",
package/src/cli.mjs CHANGED
@@ -46,7 +46,7 @@ Options:
46
46
  --viewport-height <pixels> CSS viewport height
47
47
  --scale <1|2> Device scale factor; the video is the viewport times this
48
48
  --fps <30|60> Encoded frame rate
49
- --capture-quality <1–100> JPEG frame quality (default: 95); lower can reduce capture cost
49
+ --capture-quality <1–100> JPEG frame quality (default: 85); higher keeps more detail
50
50
  --capture-diagnostics Include frame delivery cadence and gaps in the JSON summary
51
51
  --post-roll <seconds> Tail after the flow (default: 0.3)
52
52
  --ready-timeout <seconds> Playwright default timeout during navigation and ready() (default: 30)
package/src/config.mjs CHANGED
@@ -54,7 +54,7 @@ function recordingConfig(options, viewport, defaults) {
54
54
  fps: options.fps ?? defaults.fps,
55
55
  }
56
56
  check(video.fps === 30 || video.fps === 60, 'FPS must be 30 or 60.')
57
- const captureQuality = options.captureQuality ?? 95
57
+ const captureQuality = options.captureQuality ?? 85
58
58
  check(Number.isInteger(captureQuality) && captureQuality >= 1 && captureQuality <= 100, 'Capture quality must be an integer from 1 to 100.')
59
59
  check(options.captureDiagnostics === undefined || typeof options.captureDiagnostics === 'boolean', 'Capture diagnostics must be a boolean.')
60
60
  check(video.width % 2 === 0 && video.height % 2 === 0, 'At scale 1, the viewport width and height must be even.')