Skip to content

fix(cli): record command forwards video.captureMode / video.jpegQuality#32

Open
jarkkosyrjala wants to merge 1 commit into
shreyaskarnik:mainfrom
jarkkosyrjala:fix/record-forward-capturemode-jpegquality
Open

fix(cli): record command forwards video.captureMode / video.jpegQuality#32
jarkkosyrjala wants to merge 1 commit into
shreyaskarnik:mainfrom
jarkkosyrjala:fix/record-forward-capturemode-jpegquality

Conversation

@jarkkosyrjala

Copy link
Copy Markdown

Problem

The record command silently ignores video.captureMode and video.jpegQuality from the config.

In src/cli.ts, the record(demo, { … }) options object omits both fields:

await record(demo, {
  demosDir: config.demosDir,
  baseURL,
  video: { width: config.video.width, height: config.video.height },
  browser,
  deviceScaleFactor: config.video.deviceScaleFactor,
  // captureMode / jpegQuality NOT forwarded
  isMobile: config.video.isMobile,});

But src/record.ts reads them off options:

  • options.captureMode (record.ts:148useJpegStitch = options.captureMode === 'jpeg-stitch')
  • options.jpegQuality (record.ts:262String(options.jpegQuality ?? defaultJpegQuality))

So setting captureMode: 'jpeg-stitch' and/or jpegQuality: 100 in argo.config has no effect under argo record — the recorder always falls back to the webm path and the default JPEG quality (80 at dsf>1 / 95). The pipeline command is unaffected because it already forwards both (src/pipeline.ts:186-187, 540-541):

captureMode: config.video.captureMode,
jpegQuality: config.video.jpegQuality,

Symptom

I hit this while trying to raise screencast JPEG quality: on saturated-colour UI, the default quality-80 JPEG screencast produces visible per-frame flicker on anti-aliased edges (temporal noise the export can't remove). captureMode: 'jpeg-stitch' + jpegQuality: 100 fixes it — but only via pipeline, not record, until this change.

Fix

Forward both fields in the record command's options, mirroring pipeline:

deviceScaleFactor: config.video.deviceScaleFactor,
captureMode: config.video.captureMode,
jpegQuality: config.video.jpegQuality,
isMobile: config.video.isMobile,

Two lines. Both are already declared on VideoConfig (src/config.ts:67,70) and RecordOptions (src/record.ts:28,30), so it's type-safe. tsc --noEmit passes.

Notes

  • No behaviour change unless the user actually sets these fields (both are optional, defaults unchanged).
  • Verified against v0.38.0 / current main.

The `record` command's `record()` options object omits `captureMode` and
`jpegQuality`, so setting them in `argo.config` has no effect on `argo record` —
`record.ts` reads `options.captureMode` / `options.jpegQuality` (e.g. to select
jpeg-stitch and the screencast JPEG quality), but the CLI never passes them, so
they silently fall back to defaults (webm / quality 80-95). The `pipeline`
command already forwards both from `config.video.*` (pipeline.ts); this makes
`record` consistent.

Symptom: `captureMode: 'jpeg-stitch'` + `jpegQuality: 100` in the config are
ignored under `argo record`, so saturated-colour content keeps the default-
quality JPEG screencast (visible per-frame flicker on anti-aliased edges).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant