Sizing groups of sources - confusing behavior

InventorEvan

New Member
Apologies for the length, I'm trying to give the right details. I have trouble with sources that change visual size on me, when I'm not looking at them, so that I switch to them during streaming and they are now in the wrong size or position. It happens to grouped sources, and similarly to sources that are in nested scenes. Sometimes, groups get in weird states that cause any source added to them to disappear from the canvas entirely.

I've fought with this for a year, and nearly every stream I have to interrupt the stream to resize, or delete and then re-add sources who are no longer in the place they were last time I activated them.

Log file (includes specifically Problem #2 listed below. I believe problem #1 happened earlier in the run, but will get a new log file for that ASAP.)

Here's what I want : multiple sources I can switch between, within a fixed area of the screen. I'd like them stretched to fill that area, then cropped so they don't extend past it. They might be different aspect ratios. In the example below I usually have the bottom-right quadrant configured to switch between three or more sources including (1) a webcam over my workbench, natively 2560x1440, (2) my main desktop, natively 1920x1200, for when I'm using CAD and (3) a slideshow that explains my current project, which is a nested scene natively 1920x1080. I do the switching with the script "source-toggler.lua" and stream deck mobile. The switching works great.

1731104907091.png


I'd then like to be able to reuse those collections of sources in other scenes. For example this one, which has one main and one smaller scene. Both are collections of sources that I might switch during my stream. For example, the big source could be the same collection of sources used in the upper-left of my quad-scene, and the small one could be the same collection used in the Bottom-right of the quad scene.

1731105149437.png


I've tried building this two ways:
1) I make a nested scene and position the sources inside it by hand. Then add the nested scene to my main scene and resize & crop it to the region I want.
2) I make a group for each quadrant, set the group to a bounding box, set the position and bounds to the region i want, set "scale to outer bounds", and add the sources to it

Right now I'm using the group method in my main/quad scene's, so it's sources look like this:

1731105231106.png


Both solutions work for a while but then inevitably scramble the size of my sources.

HERE ARE THE PROBLEMS THAT OCCUR:
Problem 1) When using groups, some sources already in the group will suddenly get resized, always when they are hidden and I'm not looking at them. I *think* this happens sometimes when I add a new source to the group, or edit one of them. But not every time. I frequently add or remove sources to the group and nothing breaks. Locking the group or the sources in it does NOT protect from those sources getting resized on me. In the most common manifestation I'll make some change to the group, say adding or resizing a source, and discover later that one of the other sources is now 1/4 or 1/16 of its original size, on-screen. But it doesn't happen every the time. Often I can add a source to the group without it changing the size or bounding box, of the group or any other source within it. And when it does happen, it doesn't usually resize *all* the sources in the group. Just one or two suddenly get smaller, the others are unaffected.

I assume there is a consistent cause ... I just don't understand groups well enough to identify it. I know a group is supposed to stretch to accommodate all its sources, but I don't really get how that interacts with the group being locked, and/or the group having fixed bounds and "stretch" turned on.

Often the fix is to remove all the sources from the group, unlock them, reset all their transforms, reset the group transform, manually recreate the group's bounds settings, lock it, and add all the sources again. Usually it will then work again for a few days.

Sometimes however, that fix won't work. It then may exhibit problem #2, which is worse.

Problem 2) The group itself will get in some weird state that breaks the transform of any source added to it. This is currently happening in the run for the attached log. The group appears to have correct settings, but if I add any source to it, that source will be given position 90001x, 90001y and size 0,0. Once this happens, the only fix I have found is to completely delete the group and re-create it.

This happened while trying to fix an instance of problem 1. One of the sources in "DEFAULT - Bottom Right" changed size to 1/4 its previous size. So I removed all the sources, reset their transforms, and re-added them. The group itself still shows as having a bounding box in the lower-right corner, as shown here

1731106077142.png

Bottom-Right, when selected, still appears to have correct bounds in the correct place

1731106102618.png

Current transform on Bottom-Right group

Here's a small source (an old USB webcam) and its transform before adding it to the Bottom-Right group:
1731106420092.png

And here's the same source after adding it to the Bottom-Right group. See the insane position and zero size. The source disappears from the screen entirely.
1731106444570.png


Once a group gets into this state, nothing I do will fix it. The only solution I've found is to delete the group and recreate it, re-adding all its sources one at a time.

This happens to me about twice a week. I spend a lot of time in my streams fixing broken groups and sources.

Problem 3) Similar things also happen when I use nested scenes instead of groups, to create collections of sources I can switch between. However there it is more often the problem that if I am using a nested scene in two different scenes, editing its size in one scene will cause an unexpected change in the other scene. Sometimes a change in a source inside the scene, sometimes the entire nested scene. Like I'll slightly resize a quadrant in my 4-cam scene and when I switch back to the 2-cam scene, over there the same nested scene will be 1/4 or 1/16 the size it was before.

I've been fighting these problems for an entire year of streaming. I really could use help getting this system stabilized so I can focus on my streaming instead of constantly having to fix sources that have suddenly resized themselves.

Thanks for any assistance.
 

InventorEvan

New Member
Update: Well, I just sent another hour and a half systematically fiddling with it. The sudden-make-a-source-small behavior definitely happens when I add a source to an existing group.

And I think at least part of the solution needs to be: never ever fiddle with the transform on a group. Set the bounding box and position on each source individually, then use the group on them only to enable turning the whole group on/off or enabling source-toggler.lua. Just don't use groups to control the positioning.

At the moment, this looks like it might get me more consistent behavior. It's annoying because I really wanted to make reusable collections of sources where I could resize & position the entire collection. But that seems to be a misuse of groups, perhaps?
 

Suslik V

Active Member
It is bug in OBS. It was more noticeable in v27+ (where the group's Size wasn't "zeroed" and shown actual 90001.0000 px, as soon as you updated Transform window by re-selecting the object).

Steps to reproduce:
  1. Make new Profile
  2. Make new Scene Collection
  3. Set Settings > Video > Base (Canvas) Resolution = 1920x1080
  4. Set Settings > Video > Output (Scaled) Resolution = 1920x1080
  5. Add empty Group to the scene
  6. Modify Transform of the "Group" (Ctrl + E): set Position = (960; 540)
  7. Add to the scene Color Source of 320x240 size
  8. Move the "Color Source" source from p7 into the "Group" from p5 (drag-n-drop)
  9. Open Transform properties (Ctrl + E) of the recently grouped item ("Color Source")
If Transform of the source shows something like: position = (90001; 90001) and size = 0x0 then, I think, it should be reported to: https://github.com/obsproject/obs-studio/issues
 
Last edited:
Top