New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 781117 link

Starred by 13 users

Issue metadata

Status: Assigned
Owner:
Last visit 28 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: add a protocol method to generate a video stream of the page

Project Member Reported by lushnikov@chromium.org, Nov 3 2017

Issue description

There's a demand for a video of headless browser operating:
- https://github.com/GoogleChrome/puppeteer/pull/881
- https://github.com/GoogleChrome/puppeteer/issues/478

The current solution for this - Page.screencastFrame - doesn't scale well and yields a poor-quality video.

Instead, we should produce a video stream on our end. This will allow us to control quality and framerate. It also will be much more efficient.
 
Cc: ericbidelman@chromium.org
Cc: eseckler@chromium.org
Adding esseckler@ since I think he already had some thoughts about this.
I think the tricky thing will be controlling the frame rate. Some thoughts:
(1) Page.screencastFrame currently doesn't influence the frame rate. It's relying on the CompositorFrame production rate of the compositor.
(2) Controlling the compositor's frame rate could be done using BeginFrameControl (bug 646774). Right now, that's only possible in headless (but there are plans to port it to desktop in the future).
(3) New CompositorFrames are only produced if there were updates for a BeginFrame (vsync interval). So if we wanted a fixed-frame-rate video, we'll need to fill gaps between frames.
If i may add, this would open up the possibility of doing headless WebGL video rendering, both useful for Q&A automation and even use Chromium as 2D/3D video rendering engine.
Is the plan still to do this in chromium or should we attempt to use the screencastFrame API to stitch a video together ourselves.
Would it be realistic to expect 60fps for such a video stream? For our use case we are using greensock to control smooth animations that we want to record without loosing frames.
We would actually be able to stitch the frames together ourselves (piping them into ffmpeg). 

Comment 7 by ana...@yandex-team.ru, Today (7 hours ago)

Hello!
eseckler@chromium.org Is there any news about this task? Do you have plans to implement it?

Sign in to add a comment