Enable rendering outside of the screen

Having problems with building or using the JCEF Java binding? Ask your questions here.

Enable rendering outside of the screen

Postby HarmfulBreeze » Sat Jun 06, 2020 5:36 am

Hi,
I've been running into an issue lately, related to CEF and maybe JCEF. My project uses JCEF to render a page stored locally. This browser window is supposed to be captured by OBS Studio.
My problem is: if your screen is 1080p and you want the browser window to also be 1920x1080 (if recording in 1080p), it means that a part of your window will be off-screen and CEF (or maybe Swing?) stops rendering what goes outside of the screen boundaries, which results in having a part of the window being captured by OBS be frozen.

Is there a way to work around this? I'm using CEF v78.2.7, JCEF commit 9b6223b.
Thank you in advance.
HarmfulBreeze
Newbie
 
Posts: 7
Joined: Mon Feb 17, 2020 5:10 am

Re: Enable rendering outside of the screen

Postby magreenblatt » Sat Jun 06, 2020 1:52 pm

What OS are you running on? Does it work with other (non-CEF based) application windows?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Enable rendering outside of the screen

Postby HarmfulBreeze » Sun Jun 07, 2020 7:54 am

I'm on Windows 10.
So I'd always thought that off-screen window capture worked just fine when parts of the window were off-screen BUT I went ahead and tried doing the same with another app and I found out that it did not work perfectly either.

Here are my findings:
- Firefox with HW acceleration enabled and BitBlt capture (regular window capture mode): white screen in OBS
- Firefox with HW acceleration disabled and BitBlt capture: no white screen but everything out of the screen is frozen
- Firefox with HW acceleration enabled and Windows Graphics Capture (new window capture mode, Windows 10 1903+): perfect compatibility
- Firefox with HW acceleration disabled and WGC: everything out of the screen is frozen
- CEF with GPU compositing and BitBlt: black screen
- CEF with "--disable-gpu-compositing" and BitBlt: everything out of the screen is frozen
- CEF with GPU compositing and WGC: perfect compatibility
- CEF with "--disable-gpu-compositing" and WGC: everything out of the screen is frozen

Now what I could do is require users to use Windows Graphics Capture, but then they would be forced to have a recent enough version of Windows for it to work and it's something I'd like to avoid. BitBlt is also usually used as the automatic capture mode by OBS.

Do you think there's something I could do about it, or should I just give additional setup steps to the end-user?
HarmfulBreeze
Newbie
 
Posts: 7
Joined: Mon Feb 17, 2020 5:10 am

Re: Enable rendering outside of the screen

Postby magreenblatt » Sun Jun 07, 2020 5:23 pm

I suggest reaching out to the OBS developers. I believe there’s a CEF plugin for OBS. They might also have additional ideas.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 12 guests