You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created multi OffScreen ChromiumWebBrowser with different URL, each ChromiumWebBrowser render the image, then will send the image to another server, but i found the render fps less than i set, any idea that i can keep right fps when rendering?
one OffScreen ChromiumWebBrowser, i have right fps.
two OffScreen ChromiumWebBrowser, i have right fps.
three OffScreen ChromiumWebBrowser, the fps will less fps, probably only half of it(formatInfo.FrameRate * 0.5)
four OffScreen ChromiumWebBrowser, the fps will less fps, probably only half of it(formatInfo.FrameRate * 0.5)
didn't test more.
This is my key code:
example the formatInfo.FrameRate is 25, formatInfo.Width: 1920, formatInfo.Height: 1080
var settings = new CefSettings
{
// Off-screen rendering core configuration
WindowlessRenderingEnabled = true,
// Disable unnecessary log output (improves performance, reduces IO)
LogSeverity = LogSeverity.Disable,
// Ignore certificate errors (decide whether to keep based on actual scenario)
IgnoreCertificateErrors = true,
// Disable external message pump (recommended for off-screen rendering)
ExternalMessagePump = false,
// Set cache path (avoid rebuilding cache on every startup)
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NDIProvider", "cef_cache"),
MultiThreadedMessageLoop = true
};
// Apply best performance parameters for off-screen rendering
settings.SetOffScreenRenderingBestPerformanceArgs();
// Initialize CEF
return Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null);
int frameRate = formatInfo.FrameRate;
var browserSettings = new BrowserSettings(true)
{
WindowlessFrameRate = frameRate,
BackgroundColor = (uint)Color.Transparent.ToArgb()
};
var requestContextSettings = new RequestContextSettings
{
CachePath = GetCachePath(),
};
var requestContext = new RequestContext(requestContextSettings);
_browser = new ChromiumWebBrowser(url, browserSettings, requestContext)
{
Size = new Size(formatInfo.Width, formatInfo.Height),
};
await WaitInitAsync(_browser);
_browser.Paint += BrowserOnPaint;
_browser.LoadError += _browser_LoadError;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody,
I created multi OffScreen ChromiumWebBrowser with different URL, each ChromiumWebBrowser render the image, then will send the image to another server, but i found the render fps less than i set, any idea that i can keep right fps when rendering?
This is my key code:
example the formatInfo.FrameRate is 25, formatInfo.Width: 1920, formatInfo.Height: 1080
Beta Was this translation helpful? Give feedback.
All reactions