Record 60 frames per second WebGL on headless Chrome

1,243 views
Skip to first unread message

duked...@gmail.com

unread,
May 22, 2018, 5:20:23 AM5/22/18
to headless-dev
Headless Chrome does not use hardware GPU - this is sad :-(

Instead headless Chrome uses the SwiftRender software renderer.

I still need to be able to render 60 frames per second - even if it is slow to do so - and save the resulting animation to a file.

Is this possible?

Eric Seckler

unread,
May 22, 2018, 5:46:41 AM5/22/18
to duked...@gmail.com, headless-dev
You can use virtual time together with a manual rendering mode to render animations at a custom, deterministic frame rate. See this thread and bit.ly/headless-rendering for some background reading. FYI, this is still an experimental feature, we intend to refactor the DevTools APIs related to virtual time and BeginFrames in the near future.

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/274faca3-f185-4ae6-adb4-4b8d21214fec%40chromium.org.

duked...@gmail.com

unread,
Jul 18, 2018, 9:54:31 PM7/18/18
to headless-dev, duked...@gmail.com
Is there a tangible example of how to use virtual time together with a manual rendering mode to render animations at a custom, deterministic frame rate?

I've read the links you posted but they didn't seem to boil down to tangible actions.

I want to be able to capture 3d animations on the webgl canvas and also screencasts.

thanks
 

Eric Seckler

unread,
Jul 19, 2018, 2:15:18 AM7/19/18
to duked...@gmail.com, headless-dev
There's a test here, which illustrates this:

https://cs.chromium.org/chromium/src/headless/public/util/compositor_controller_browsertest.cc?sq=package:chromium&g=0&l=86

I don't have an example for using it from node/puppeteer right now.

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.

duked...@gmail.com

unread,
Jul 19, 2018, 5:30:02 PM7/19/18
to headless-dev, duked...@gmail.com
Apologies for being a noob, but is this how I get the required experimental headless Chrome?



Eric Seckler

unread,
Jul 20, 2018, 2:16:16 AM7/20/18
to duked...@gmail.com, headless-dev
That should work :)

On Thu, Jul 19, 2018, 22:30 <duked...@gmail.com> wrote:
Apologies for being a noob, but is this how I get the required experimental headless Chrome?



--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.

duked...@gmail.com

unread,
Jul 21, 2018, 6:40:39 PM7/21/18
to headless-dev, duked...@gmail.com
Thanks Eric - I'm going to do my best to figure out how to do this in JavaScript but if you were willing to provide a JavaScript example of how to drive virtualtime for deterministic rendering it would be a huge help.

thanks

Yuanjun Zhong

unread,
Apr 22, 2021, 5:02:13 AM4/22/21
to headless-dev, duked...@gmail.com
Hi, ducked... I encounter the same problem as you. Have you solved it?
Reply all
Reply to author
Forward
0 new messages