obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
59.71k stars 7.92k forks source link

[BUG] High CPU usage on macOS when capturing Chrome or Blender with window capture #2815

Closed basvdijk closed 2 years ago

basvdijk commented 4 years ago

Platform

Operating system and version: macOS Catelina 10.15.3 OBS Studio version: 25.0.7

Expected Behavior

No excessive CPU usage when idle and preview window capture

Current Behavior

When starting OBS studio the CPU usage is around 15%.

When I start previewing (so not recording) Blender with Display Capture the CPU is around 20% However when I start previewing Blender with Window Capture the CPU is around 80%

I tried to change the quality from 60fps to 30fps but this didn't matter.

Steps to Reproduce

I noticed this behavior with Blender:

  1. Download and install https://www.blender.org/
  2. Create a Window Capture in OBS and select Blender
  3. Open Activity Monitor and check cpu usage of OBS. The window of OBS shows around 5% however the Activity monitor shows around 80%.

After the remark of @dodgepong it turned out to be capturing any application using Window Capture

dodgepong commented 4 years ago

Are you sure this only applies to Blender and Chrome? I would expect to see this behavior when capturing any large window with Window capture on macOS due to the way Window capture works.

basvdijk commented 4 years ago

@dodgepong it turned out you're right. I only tested Chrome since it was a different application than Blender. I've updated the issue accordingly.

simonredfern commented 4 years ago

Same issue here.

simonredfern commented 4 years ago

Note however that I also have CPU issues with other video related activity. I.e. zoom video conferencing puts my CPU to 100%.

jeevn commented 4 years ago

Similar problem here on MBP 2.6GHz 6c i7, Catalina 10.15.5 — Window Capture in OBS 25.0.8 is exceeding 80% CPU.

ShKlinkenberg commented 4 years ago

For me, it does not seem to be related to the Window Capture, but to using the EOS webcam utility. When adding video capture device -> EOS webcam utility my CPU goes over 80%. But when adding Syphon Client through the "camera live" app, with the same camera, the CPU stays below 20%.

Even when video capture of EOS webcam utility is not in use, in different scene and visibility in sources turned off, it still strains the CPU to 70%.

richardbrockie commented 4 years ago

I too have high CPU usage using a Camlink4k as a source with a couple of years old macBook Pro (justly famed for not great thermals!). If there's any way to offload more work to the GPU that would be great. I generally use OBS with an eGPU which obviously is much better at dealing with any heat.

akamensky commented 3 years ago

I am seeing the same issue with Window Capture in 26.0.2. It happens with another software that is using GPU for rendering (CAD software). This does not happen when capturing same window using Display Capture (thus only Window Capture is affected).

Some stats:

While I can live with 9-12%, this actually causes my Mac to spin fans on full RPM, which adds background noise and at some points I do see occasional "frames missed due to rendering lag".

For now I work around this by using Display Capture + crop to window. Which keeps CPU usage on very low.

lewisxy commented 3 years ago

I have the same issue. I am using OBS 26.0.2 on 2018 13-inch MacBook Pro (quad core i5) with macOS 10.14.6. When doing nothing, the CPU is around 3-4%. When having a display capture, the CPU is around 4-5%. When having a window capture, the CPU is around 10% (and the keyboard becomes uncomfortably hot to use after a few minutes). All the above mentioned CPU usage is reported by OBS (when not streaming or recording), which the activity monitor reports around 8x of that.

Not sure if it's an issue of OBS or macOS (regarding the window capture mechanism).

nvdh commented 3 years ago

I have the same problem Macbook Pro 2,4Ghz 8-Core Intel i9 64Gb DDR4, AMD Radeon Pro 5600M 8Gb. With 3 Chrome captures, CPU% bumps up from 20% to 300% and laptop becomes extremely hot. Certainly can't stream like this.

My camera is an EOS 90D

beastaugh commented 3 years ago

Having the same issue with window capture while recording, even just capturing one window from a PDF in Skim. CPU usage is consistently about 83% and the fans remain on the whole time. MacBook Pro 2017, 2.3 GHz Intel Core i5, 8 GB DDR3, macOS 10.14.6.

funkymed commented 3 years ago

Also have the same issue, my cpu goes to 80% without doing anything

sami616 commented 3 years ago

For me, it does not seem to be related to the Window Capture, but to using the EOS webcam utility. When adding video capture device -> EOS webcam utility my CPU goes over 80%. But when adding Syphon Client through the "camera live" app, with the same camera, the CPU stays below 20%.

Even when video capture of EOS webcam utility is not in use, in different scene and visibility in sources turned off, it still strains the CPU to 70%.

@ShKlinkenberg im having the same issue with the canon webcam utility causing my cpu to go mad. Did you ever find a solution?

billimek commented 3 years ago

I hope this is on-topic for this particular issue, but the current version of OBS (27.0.0) consumes consistently between 130-140% CPU when sitting idle doing nothing in MacOS 10.15.7. No sources selected, no scene activity.

image

I would love to find any way to work around this or things to check on the system side. The experience is completely different in Windows.

dossy commented 3 years ago

Another potential candidate to be fixed by #4863.

gxalpha commented 2 years ago

We now have a newer, more efficient capture source built into OBS 28 ("macOS Screen Capture") and also merged the improvements to traditional window capture.