Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use CDP screencast API to record mp4 videos #4

Open
nirtal85 opened this issue Feb 6, 2023 · 2 comments
Open

use CDP screencast API to record mp4 videos #4

nirtal85 opened this issue Feb 6, 2023 · 2 comments

Comments

@nirtal85
Copy link

nirtal85 commented Feb 6, 2023

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?

@sergueik
Copy link
Owner

sergueik commented Feb 7, 2023 via email

@nirtal85
Copy link
Author

thank you very much!

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

No branches or pull requests

2 participants