Record the CEF window contents as a file

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Record the CEF window contents as a file

Postby xuyoucai » Tue Oct 20, 2020 8:40 pm

I can't capture CEF window contents(black frame captured) due to GPU acceleration on by using the windows API. How can I capture the web contents? I want to record the CEF window contents as a file.
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Record the CEF window contents as a file

Postby xuyoucai » Sun Mar 21, 2021 10:45 pm

Does anyone have any good suggestions?
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Record the CEF window contents as a file

Postby amaitland » Sun Mar 21, 2021 11:18 pm

If you mean capture a screenshot of the browser then you can use DevTools.

https://chromedevtools.github.io/devtoo ... Screenshot

CEF supports directly sending devtools commands.

https://bitbucket.org/chromiumembedded/ ... ation-over
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Record the CEF window contents as a file

Postby xuyoucai » Mon Mar 22, 2021 1:14 am

amaitland wrote:If you mean capture a screenshot of the browser then you can use DevTools.

https://chromedevtools.github.io/devtoo ... Screenshot

CEF supports directly sending devtools commands.

https://bitbucket.org/chromiumembedded/ ... ation-over


This method I have tried, but it takes too much time to capture a screenshot of the browser. I want to record browser as a file, so the smooth picture is necessary。
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Record the CEF window contents as a file

Postby amaitland » Sat Mar 27, 2021 12:28 am

DevTools under the performance tab has the ability to record which can include screenshots. I believe CEF supports a devtools-protocol-log-file command line arg which can be used to determine what sequence of commands is required.

https://bitbucket.org/chromiumembedded/ ... t-57838380

Otherwise you'll probably have to implement OSR and use the bitmap generated for each frame to create a recording.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Record the CEF window contents as a file

Postby amaitland » Sat Mar 27, 2021 2:32 pm

Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Record the CEF window contents as a file

Postby xuyoucai » Mon Mar 29, 2021 9:54 pm

Thanks for anwser, I will try it.
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 20 guests