Skip to content

use CDP screencast API to record mp4 videos #4

@nirtal85

Description

@nirtal85

Currently, there is no real option without complex scripts to record in headless mode
CDP provides screencast API selenium already implemented but does not use it (and no guides on using it)
frameworks like cypress puppeteer and playwright use it already.

start screen cast
devTools.send(Page.startScreencast(Optional.of(Page.StartScreencastFormat.JPEG), Optional.of(100), Optional.of(1920), Optional.of(1080), Optional.of(1)));
stop screencast
devTools.send(Page.stopScreencast())
and an event listener which receives the raw data (which are the frames)

https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-startScreencast
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-stopScreencast

can you please add an example how to use it to generate mp4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions