Comments (12)
CEF is pretty demanding, however I can't reproduce this here:
GST_PLUGIN_PATH=$PWD/Release:$GST_PLUGIN_PATH gst-launch-1.0 cefsrc url="https://google.com" ! queue ! cefdemux name=d d.video ! video/x-raw ! queue ! videoconvert ! autovideosink
shows around 55 % CPU usage on my machine, with single-core load not exceeding 40 % .
The default resolution is 1920 x 1080, and lowering that to eg 640 x 480:
GST_PLUGIN_PATH=$PWD/Release:$GST_PLUGIN_PATH gst-launch-1.0 cefsrc url="https://google.com" ! video/x-raw, width=640, height=480 ! queue ! cefdemux name=d d.video ! video/x-raw ! queue ! videoconvert ! autovideosink
does show a corresponding decrease in CPU usage (20 %, single core not exceeding 10 %).
More precisions will be needed to debug this, eg what hardware are you running this on, does CPU usage decrease if you lower the resolution, gstreamer version, etc ..
from gstcefsrc.
- Tried with 320x240 @ 10fps - google.com, still it's 10% load
- gstreamer version is 1.14.5
- Regardless of hardware it takes 100% of one core, tried on laptpo, Intel E3v4 server, aws c5 instances too.
- When i wrtoe a simple CEF app without gstreamer there i do not see this issue.
- I'm suspecting something is going wrong as CEF & Gstreamer both use glib event loop.
from gstcefsrc.
- Tried with 320x240 @ 10fps - google.com, still it's 10% load
I assume you meant 100 % here :)
- gstreamer version is 1.14.5
OK, I'm trying with gst-build / master, please set that up on your end and report results
- I'm suspecting something is going wrong as CEF & Gstreamer both use glib event loop.
Usage of GMainLoop in and of itself isn't known to cause such issues ;)
from gstcefsrc.
Perhaps you can learn more with a profiling program, eg gprof
from gstcefsrc.
On replacing g_main_loop_run()
from gstreamer app with while (true) sleep()
and adding CefRunMessageLoop();
instead of CefDoMessageLoopWork ();
in cefsrc plugin, 100% CPU load issue went away.
But obviously this is not a correct solution as event handling in gstreamer app is broken.
from gstcefsrc.
Interesting, but please try with latest gstreamer: https://gitlab.freedesktop.org/gstreamer/gst-build
from gstcefsrc.
Also @hamza-u please paste the pipeline you're trying
from gstcefsrc.
Sure i will try with latest gstreamer.
pipeline used : cefsrc ! videoconvert ! fakesink sync=true async=false
Also tried with xvimagesink.
from gstcefsrc.
OK.
On my end:
GST_PLUGIN_PATH=$PWD/Release:$GST_PLUGIN_PATH gst-launch-1.0 cefsrc url="www.google.com" ! videoconvert ! fakesink sync=true async=false
CPU usage sits at 11 % :)
I assume you haven't modified the default CEF version downloaded by the build system?
In any case, definitely try with master gst-build, and ideally obtain profiling data with gprof.
from gstcefsrc.
@hamza-u to keep things tidy I will close this as I haven't had an answer to my last question, please reopen if you have more information.
from gstcefsrc.
@MathieuDuponchelle , sorry for delayed response, i was using CEF version 76.1.13+gf19c584+chromium-76.0.3809.132
, on using same version as yours 3.3440.1806.g65046b7
i do not see high cpu usage issue.
from gstcefsrc.
ok then :)
from gstcefsrc.
Related Issues (20)
- Windows build HOT 4
- Pipeline hangs (Windows) HOT 11
- Wayland Support HOT 1
- License HOT 3
- Sandbox HOT 6
- registering JS Callbacks using RenderProcessHandler::OnContextCreated() HOT 1
- Leaves 5 processes running after `stop` HOT 7
- Mixing audio and video with `matroskamux` causing deadlocks HOT 40
- Rare negotiation errors are happening between cefsrc and cefdemux HOT 3
- Not compiling on macOS Ventura on MacBook M1
- Broken Linux x64 build HOT 2
- Deadlock when mixing Audio and Video HOT 6
- trying to build for jetson nano HOT 21
- Cef Segmentation fault HOT 4
- Bad audio meta HOT 10
- [Q] what is the purpose of the audiotestsrc ? HOT 4
- cefsrc in headless environment using GPU HOT 8
- No video output with `gtk4paintablesink` and `clappersink` HOT 4
- Plugin files blacklisted but plugin still works HOT 2
- Inconsistant caps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gstcefsrc.