Question / Help Record a window only when in focus (pause when inactive)

Merritt

New Member
Hello!

I have the same question as this person: https://obsproject.com/forum/threads/record-a-window-only-when-in-focus-pause-when-inactive.79962/

Happy Saturday!

I'm trying to record a speedpaint but I'm not great at concentrating on my drawing software (Paint Tool SAI) the entire time. Sometimes I switch windows to surf reddit, facebook etc. That would leave the recording window inactive for very long.

Is it possible to pause the recording when I switch out of the window,
and resume recording when I focus on the window again?


Thank you!

Pause actually is a feature of OBS now, so I am wondering is this possible?

I didn't see any setting for it, nor a plugin. I've tried pausing and unpausing manually, but I constantly forget and progress in my piece with large chunks not recorded. If this feature is not available, but possible with something like a plugin I would be willing to give writing that a try.
 

Merritt

New Member
Thanks to @kurufu on Discord, there is an answer:

In Tools -> Scripts you can add one of the default scripts, `pause-scene`, and tell it to pause when you are on a specfic scene. I created a scene called `Paused` that points to nothing.

Then Tools -> Automatic Scene Switcher and set it up so that `When no window matches` -> `Switch to: Paused`

In my example the Automatic Scene Switcher says Scene: Blender matches window: Blender, if no match switch to scene 'Paused'.

There is an unfortunate black screen briefly in the recording each time, but it does automatically pause and resume which is the most important part :)
 

fqvls

New Member
Thanks to @kurufu on Discord, there is an answer:

In Tools -> Scripts you can add one of the default scripts, `pause-scene`, and tell it to pause when you are on a specfic scene. I created a scene called `Paused` that points to nothing.

Then Tools -> Automatic Scene Switcher and set it up so that `When no window matches` -> `Switch to: Paused`

In my example the Automatic Scene Switcher says Scene: Blender matches window: Blender, if no match switch to scene 'Paused'.

There is an unfortunate black screen briefly in the recording each time, but it does automatically pause and resume which is the most important part :)

Hi men. Could yo send maybe some captures of the configs that you wrote? I have exactly the same issue that you had and i can't solve it. My discord is fq#2360 if you want to talk me over there. You will help me a lot if you do it, thanks.
 

fqvls

New Member
Edit: I could solve it, it was very obvious and researching a bit I solved it. thanks.

I also solved the black screen flickering, instead of leaving the "pause" scene with nothing I put him to capture the same window (in my case blender), then every time I change window instead of seeing the black screen will see the program and not even notice the pause.
 

Merritt

New Member
Glad you got it working!

Also, that's a very smart fix for the black screens. I tried it out, and yeah - same source, transition is cut - you can't even notice it. Thanks for the tip! :)
 

fqvls

New Member
Glad you got it working!

Also, that's a very smart fix for the black screens. I tried it out, and yeah - same source, transition is cut - you can't even notice it. Thanks for the tip! :)

Sorry to bother you again. I have a problem with the automatic scene switcher. the blender window constantly change its name depending on the direction and the name with which you save the project and I don't know what name to put to take the window. when I am without a saved project (the name of the window says only "Blender" and nothing else) the obs doesnt have a problem and it just works fine, but when I save it the windows change the name on something like this:

1581836264554.png


What name did you put in the part of the automatic scene switcher so that does not happen?
 

Merritt

New Member
Ah yeah I had the same trouble. Try this:

^Blender.*

Which as far as I can tell basically means "Match any window that begins with 'Blender' and anything after"
 
Top