Nested scenes uses excess CPU and GPU resources

matt_mexico

New Member
I am running OBS on a relatively low-power device and therefore every little bit of resource usage is noticeable.

I have found that nesting a a scene into another seems to be using a significant amount of CPU+GPU recourse (more than the contents would normally cause). Even when nesting a blank scene, some resource is still used.

I have summarized the scenes and CPU% | GPU% below. You can also see the actual scene components in the images attached. As you can see, individually the BLANK and OVERLAY scenes use very little resources, but when nested within the CAM scene they immediately increase the CPU usage by around 20%. However, if I add the image to the CAM scene directly there is nearly 0% increase in GPU usage.

Nesting scenes is a very useful feature, but is there any way I can do it without such a big increase in recourses?

  • BLANK= 2% | 2%
    • [NO SOURCES]

  • Overlay= 3% | 4%
    • Image

  • CAM= 16% | 23%
    • Media (RTSP camera)

  • CAM +BLANK = 19% | 37%
    • Media (RTSP camera)
    • BLANK
      • [NO SOURCES]

  • CAM + Overlay= 18% | 38%
    • Media (RTSP camera)
    • OVERLAY
      • Image

  • CAM (incl image)= 16% | 22%
    • Media (RTSP camera)
    • Image
 

Attachments

  • OBS-CAM.jpg
    OBS-CAM.jpg
    76.4 KB · Views: 114
  • OBS-Overlay.jpg
    OBS-Overlay.jpg
    75.9 KB · Views: 113
  • OBS-Blank.jpg
    OBS-Blank.jpg
    79.2 KB · Views: 80
  • OBS-CAM Image.jpg
    OBS-CAM Image.jpg
    79.7 KB · Views: 78
  • OBS-CAM Overlay.jpg
    OBS-CAM Overlay.jpg
    78.7 KB · Views: 84
  • OBS-CAM Blank.jpg
    OBS-CAM Blank.jpg
    77.1 KB · Views: 108

ottawafro

Member
Any update to this ... Seeing the same things... thought i would improve the effeciency of my streams with nested scenes ... Now some of my scene used up 50 - 60 % CPU usage ..

Not sure if the nested scenes caused this or recent OBS update or perhaps a plug-in or filter.
 

Héraès

Member
Adding myself to the list of people having this problem. I recently decided to use a 2nd PC for streaming (Q9550 / Quadro K600), and :
- With only one scene having a few sources (HDMI capture, webcam, 3 images overlays) I am around 35% of GPU usage in OBS when not streaming, and 75% when stream is launched.
- With my complete scenes collection, when using the nested scene (calling various scenes with overlay's elements), I am 55% idle and 100% when streaming.

I even noticed that :
- each image added as a source in a scene takes 3% to 5%.
- each nesting iteration adds 4% to 8%.

This may sound like a caprice, but I think this is a problem for everybody : wether we have a top graphic card or not, losing such ressources is a big waste. Not mentioning that streaming in 1080p on cards like GTX 960 (the one of my gaming PC) may lag not because of the card itself being too short, but due to OBS misconceptions likt that.
 
Last edited:

Héraès

Member
I'm sorry, I have to add a new comment because new tests show that things are far worts than I supposed. Images sources and browser-pages take a huge GPU load :
  • A scene with only my HDMI source (1920x1080 @30 fps instead of 60 because my card isn't strong enough) = 12% GPU usage
  • If importing that scene : 17%
And :
  • All the overlay, alone with no screen capture = 40%. (It is composed of : webcam, alerts, various images (channel logo, etc)). This is unexpected ! A logo, a webcam in 640x360, and alerts taking 40% of GPU ???
  • Same + HDMI capture (direct source) = 52%
  • Overlay + imported HDMI scene = 57%
About the overlay :
  • A scene called "All the overlay" is called in my main scenes . It is composed itself of many scenes :
    • A scene for Alerts
    • A scene for Name of the channel
    • A scene for some decorations
    • A scene for the Webcam
    • A scene for the Chatbox
Each of these scenes can contain several sources (images or browser-pages).

How are we supposed to make several scenes in OBS if we have to reimport all those assets one by one, without gathering them in scenes ? I remind that groups are problematic : we cannot nest groups, and when applying a filter (for a special context in a scene) we can't reuse it and have to recreate another. This is why we prefer using scenes as elements to import most of time (and because we can use group in them !).

let's say I replace all those sub-scenes by a group : if for some reason in my "webcam" group I want to separate things in groups, I can't (nesting groups in groups is impossible). So, I use a scene instead.

And I'm wondering if groups would anyway take high GPU usage too. I need to do some tests to confirm it.
 

Héraès

Member
I forgot to come back to answer to this :
And I'm wondering if groups would anyway take high GPU usage too. I need to do some tests to confirm it.
I made some GPU usage savings by calling groups instead of nesting scenes.
So, I remade all my scenes collection by using less scenes nesting, and by using more groups instead.

Still have some insane GPU consumption for nothing, but it's a bit better.
 
Top