Skip to content

[Feature] Add ability to specify video params (like fps) for video recordings #17217

Closed as not planned

Description

@rachitm022

Would be good to specify params for video recordings like fps

const context = await browser.newContext({
  recordVideo: {
    dir: 'videos/',
    size: { width: 640, height: 480 },
    fps: 25
  }
});

Activity

  1. changed the title [-]Add ability to specify video params (like fps) for video recordings[/-] [+][Feature] Add ability to specify video params (like fps) for video recordings[/+] on Sep 9, 2022
  2. HeDo88TH commented on Sep 26, 2022

    @HeDo88TH

    This is a missing piece, we need this.

  3. pavelfeldman commented on Nov 16, 2023

    @pavelfeldman
    Member

    Why was this issue closed?

    Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

    If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

  4. pavelfeldman commented on Nov 17, 2023

    @pavelfeldman
    Member

    Why was this issue closed?

    Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

    If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

  5. terion-labs commented on Aug 4, 2025

    @terion-labs

    years pass...

  6. angel1254mc commented on Mar 14, 2026

    @angel1254mc

    This would be awesome. Our team has been experimenting with using Playwright to automate demo recordings. The idea is to generate scripted browser walkthroughs that could be regenerated with every release. Configurable FPS would let us produce smoother, more professional output for these kinds of non-test use cases.

    Totally acknowledge that Playwright is at the mercy of the browser's devtools protocol when it comes to the count/timing of frames it receives, so we can't really guarantee that a user's desired FPS will be respected.

    One approach could be adding an optional fps param to recordVideo that lets users set a target fps for the output video (defaults to today's 25 fps). If the browser sends enough frames, awesome. Otherwise the user just gets repeated frames to fill the gap, which matches how it works today at the hardcoded 25 fps. Thoughts?

  7. MuTsunTsai commented on Apr 27, 2026

    @MuTsunTsai

    Hi Rachit (@rachitm022), Angel Lopez Pol (@angel1254mc), @terion-name — for the FPS / demo recording use case described here, playwright-recorder-plus might be useful:

    • fps option (default 25), pluggable via attachRecorder(page, { fps: 60 }).
    • Angel Lopez Pol (@angel1254mc): your "scripted browser walkthroughs that could be regenerated with every release" is exactly the niche I built this for. CDP frame cadence varies as you noted, so the recorder runs same-slot dedup + previous-frame padding + tail padding to keep the encoded video aligned with wall-clock regardless of CDP gaps.
    • Supports pause/resume, crop, multi-page contexts, and inline audio scheduling for narration / click sounds.

    Wraps Playwright 1.59+'s public page.screencast API + ffmpeg-static, no patching needed. Not a Playwright maintainer; sharing in case it unblocks anyone.

  8. azmeuk commented on May 26, 2026

    @azmeuk

    Would like to widen the scope of this issue to cover the sibling encoding parameters that share the same pipeline:

    • codec - VP8 (current default) / VP9
    • quality or bitrate / CRF

    My use case is generating screencasts for library documentation (with sphinxcontrib-screencast, which drives Playwright in headless). The default VP8 encoding produces artefacts on small monospaced text in code blocks so being able to tweak the parameters would help. Also, tweaking would allow to produce smaller artefacts.

    Suggested shape, extending the original example:

    recordVideo: {
      dir: 'videos/',
      size: { width: 640, height: 480 },
      fps: 25,
      codec: 'vp9',
      quality: { mode: 'crf', value: 23 },
    }
  9. pavelfeldman commented on Oct 31, 2026

    @pavelfeldman
    Member

    We're closing all P3-collecting-feedback issues and retiring the label. #43813 explains why. This doesn't mean the request is wrong. If it still matters to you, please open a new issue against the latest Playwright version with your concrete use case and link back here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions