Program Window "Projection" option added as a Scene parameter?

pkhata

New Member
Sometimes we live stream lectures to FB, Zoom, etc. and some scenes also include video clips, slides, etc. But then also, if live streaming a lecture where there's also an in house audience, they need to see the video material, which is where the projection option (Ctrl-clk on Program window) is great; it sends the entire live stream to an external flatscreen, etc. But, when a lecturer is ONLY speaking and not showing video clips, the problem is his/her image in also on the flatscreen (and there's a slight audio lag, which is distracting). So the question is, can the projection option of the Program Window be incorporated into a parameter for a scene? That way, we'd only project to the in house audience scenes with media content, not those when the lecturer is just speaking.
 

AaronD

Active Member
You want different content on the projector and on the virtual camera?

A separate option for each source would require OBS to completely rebuild the entire picture for each destination, which is not much different from having a completely separate instance of OBS entirely. If your OS allows multiple apps to use the same source, then that *is* a legitimate option. I do that for one of my rigs (on Ubuntu Studio Linux, but the concept applies everywhere that it works), and synchronize them with the Advanced Scene Switcher plugin on both, sending WebSocket messages to each other.

If the content is actually the same, except for a few things missing in one of them, then you can probably do it with just one instance. Build the common stuff in one scene, and use that scene as a source for other scenes that go to different places. You can project a scene instead of the main out, and you can send a scene to the vcam too.

---

For audio, OBS has only one output beyond the stream and recording, and that's the Monitor. If you have two physical destinations that need to be different, OBS can't do that. Look at using either a physical audio console, or a DAW. Either way, do all of the audio work outside of OBS, so that OBS becomes silent, except for a video soundtrack that immediately goes out the Monitor to the external tool and nowhere else, and a finished soundtrack to stream and/or record. No processing in OBS for either one.

DAW = Digital Audio Workstation. Essentially a complete sound studio all in one app. That's all it does, and it does it very well! You'll use it for the live mixing console. Everything to do with audio connects to the DAW, not OBS.

The same rig that I mentioned above, also includes that too. And Adv. SS sends OSC messages (Open Sound Control) to it to keep it in sync as well. (mics and soundtracks on and off at the appropriate times, etc.)
 

pkhata

New Member
You want different content on the projector and on the virtual camera?

A separate option for each source would require OBS to completely rebuild the entire picture for each destination, which is not much different from having a completely separate instance of OBS entirely. If your OS allows multiple apps to use the same source, then that *is* a legitimate option. I do that for one of my rigs (on Ubuntu Studio Linux, but the concept applies everywhere that it works), and synchronize them with the Advanced Scene Switcher plugin on both, sending WebSocket messages to each other.

If the content is actually the same, except for a few things missing in one of them, then you can probably do it with just one instance. Build the common stuff in one scene, and use that scene as a source for other scenes that go to different places. You can project a scene instead of the main out, and you can send a scene to the vcam too.

---

For audio, OBS has only one output beyond the stream and recording, and that's the Monitor. If you have two physical destinations that need to be different, OBS can't do that. Look at using either a physical audio console, or a DAW. Either way, do all of the audio work outside of OBS, so that OBS becomes silent, except for a video soundtrack that immediately goes out the Monitor to the external tool and nowhere else, and a finished soundtrack to stream and/or record. No processing in OBS for either one.

DAW = Digital Audio Workstation. Essentially a complete sound studio all in one app. That's all it does, and it does it very well! You'll use it for the live mixing console. Everything to do with audio connects to the DAW, not OBS.

The same rig that I mentioned above, also includes that too. And Adv. SS sends OSC messages (Open Sound Control) to it to keep it in sync as well. (mics and soundtracks on and off at the appropriate times, etc.)
Hey, thanks for that info. Wow. But I think these are more advanced issues than we're facing. Our issue is that when live streaming to a remote server when we also have an in-house audience, if the presentation includes some scenes (not all) with say, video clips or slides, the people watching on Facebook, YouTube, etc. can see them, but the in-house people won't unless we send a feed from OBS to an external monitor, flatscreen, etc. that the in-house audience can see. That's what the OBS projection option provides by simply Ctrl-clk-ing on the Program Window--any flatscreen that's connected via HDMI can receive the live stream. It works great. BUT, most presenters do not want their image on a huge flatscreen when they're just speaking. The people watching the live stream need to see the speaker but the speaker is right in front of the in-house audience, so it's distracting (and there's an out of sync audio problem--the lips shown onscreen are not in sync with the lips on the flatscreen). So the question is simply, can the projection option of the Program Window be incorporated into a parameter for a scene? That would solve the problem--we'd only enable the projection option for scenes with video. But I don't think the projection option can be a scene parameter.
 

AaronD

Active Member
Actually, my 2nd instance of OBS is almost entirely for that purpose. It only has 2 scenes:
  • Meeting
    • Window-captures an online meeting, to show to the local audience
  • Feature
    • Grabs the vcam from the other instance of OBS, full-screen by itself
Which scene it uses, comes from a WebSocket message that is sent by Adv. SS in the 1st instance of OBS. It chooses which message to send, based on a naming convention that I invented for the scenes, so that I can add and remove scenes as needed and not need to change Adv. SS at all, as long as I follow that naming convention. In the 2nd instance, Adv. SS receives that message and switches to the appropriate scene.

In your case, the Meeting scene might change to Blackout or something like that. At any rate, the projector stays on, and you find *something* to project instead of what you don't want.
 
Last edited:

pkhata

New Member
Not sure I understand. Forgive me, I'm just a part-time OBS-er that "had" to start learning it for my church during Covid. FYI, the actual name for our use case is a "hybrid seminar"; it's both in-person and accessible online via Zoom. As I think you've indicated, yes, we activate the OBS Virtual Camera and choose that as Zoom's camera. This is basically like giving a presentation on Zoom, but with OBS's vastly superior Scene options and switching. Cool. But the additional in-person audience "requires" us to activate the Program Window projection option (copy of the live stream to HDMI/external monitor), but which we don't want activated when an OBS scene includes just the camera and mic.

Here's what I could do manually (it's very clunky). The default Scene would be one with just mic and camera. Then, when showing say, a movie clip, I'd ctrl-clk on the Program window and activate the projection option, then switch to the scene with the clip (no mic/camera), then deactivate the projection option, then switch back to the default scene with mic and camera.

You're suggesting installing the Advanced Scene Switcher (Adv. SS) and setting up two "scenes"? I can see how that might work. But can you clarify what you mean by, "In your case, the Meeting scene might change to Blackout or something like that. At any rate, the projector stays on, and you find *something* to project instead of what you don't want." Maybe I'm not understanding, but if the projection option is still on, we'd still have the problem of the in-house people seeing what the live stream people are seeing (speaker both on screen and in front of them).

BTW, I'm familiar with DAWs--I use Digital Performer, but it's not really an audio or audio syncing problem that we have.
 

pkhata

New Member
To clarify, if the "blackout" scene did not include the mic & camera, that would solve the in-house problem, but then the live stream people wouldn't see or hear anything.
 

pkhata

New Member
Actually, I don't think there is (I checked), but is there an option for custom Hotkeys? Can users create a Hotkey than could turn the projection option off?
 

AaronD

Active Member
Multiple simultaneous instances of OBS on the same machine, each of which produces different content for different destinations. I call them Master and Slave, because I have all the controls and automation logic in one of them, and the other just follows.
  • Master
    • Feeds the online meeting as if it were a live stream, with all of the scenes set up to do that
      • Could click the stream button and actually stream it to YouTube, but there's no real need
    • Virtual Camera goes to both Meeting and Slave
    • Send automation message to Slave, based on current scene name
  • Slave
    • Only 2 scenes:
      • Meeting: Window-captures the online meeting, full-screen
      • Feature: Virtual Camera from Master, full-screen
    • Switch between those 2 scenes according to automation message from Master
    • Full screen projector shows to local audience
    • Also records, with soundtrack from DAW, to upload afterwards to YT
If you change the Slave's Meeting scene to Blackout (no window capture, just the default black background), and keep the two instances like this, then I think you'd have what you want.

You might also want to record from the Master, instead of the Slave like I do, since that's the one that shows your camera. *I* record from the Slave because we want the tiled view of all participants by default in both the local room and the recording. What we send to the meeting is only the local camera full-screen, or a featured video full-screen.

I've also attached the documentation that I made to help figure it all out myself. Both for the audio routing (mostly inside the DAW), and for the script that starts it all, waits for done, and tears it all back down again. (Don't try to manage this rig manually! You WILL forget something!) I don't have one for the video routing, because I thought it was straightforward enough already. And since I didn't have any trouble with it, I guess it was.

By the way, when you look at the routing one, we use Jitsi instead of Zoom. Same idea, but open-source, free for unlimited, and a desktop client only needs a web browser. No app required, unless you're joining from a phone. I guess phone browsers don't support something that it needs?
Anyway, the open-source part is actually the server that you can install on your own machine if you want, instead of using theirs. Then an intranet meeting can be entirely off-line with the same functionality. Or you could tweak it to make it do what you want, etc. We just use their server though; it's more than enough for what we do, and still free.
 

Attachments

  • Audio-Routing.pdf
    79.2 KB · Views: 20
  • Setup-Script.pdf
    27.5 KB · Views: 12
Last edited:

khaver

Member
I think you can accomplish what you want with 2 plugins. The Advanced Scene Switcher plugin and the Main View Source plugin. Install these per your OS. In OBS you'll have your default scene with camera and mic. Lets call it Main. You'll also have your other scenes that have your video and/or slide show sources. The names of these don't matter. You want your local audience to only see the video and/or slide show scenes but the streaming audience needs to see all the scenes.

To accomplish what you want, create a new scene. Call it whatever you want. Because of the Main View Source plugin you installed you can add a source from the list called Main View Source. Add this to the new scene. This source duplicates the program output as a new source. This new scene will be what you "project" to the local audience monitor.

Open the Advanced Scene Switch plugin settings. Create a Macro. Add a condition: "If" "Scene" "Current scene is" "Main". Add an action below of "Scene item visibility" On "the new scene name you created with the program source" "Hide" "Main View Source". Click the Show else action button and add the same action as the previous one except select "Show" instead of "Hide". Also, check the box that says "Perform actions only on condition change".

Now, whenever your current scene is "Main", the Advanced Scene Switcher will hide the Main View Source on your local audience monitor and unhide the Main View Source when you're on any other scene. If, instead of only showing a black screen on the local audience monitor when the "Main" scene is live, you could add an image under the Main View Source in the new scene and this will show instead.
 

pkhata

New Member
Well, thanks very much, khaver. I'm still studying AaronD's solution, which is really thorough and impressive, but which I'm not sure I can implement in the time I have for this upcoming presentation (maybe for a future one). I think I can implement your two plugin solution though, and just reading it, it should solve the issue of not wanting a larger than life image of myself onscreen for the in-person audience. It could lead to a sort of "1984 Apple ad" kind of response.

One question: I've been using OBS Studio 27.1.3 on my 2020 MacBook Pro running 10.15 Catalina. It's been working flawlessly with no problems. To install and run the two plugins you mentioned, do I need a newer version of OBS Studio?
 

pkhata

New Member
I think the Main View Source will work on OBS 27/Intel, but noticed Adv SS requires OBS 30. Do you know which older version will work with OBS 27?
 

AaronD

Active Member
Do you know which older version will work with OBS 27?
Ugh! You pretty much have to go into each one here, check the version requirement, and make sure it's the latest that still works with your old version:
Been there, done that, with OBS 25, in a hurry because I was also learning about "secure boot" on a production machine that HAD to work soon! (I bought a new hard drive, pulled the old one to keep it safe, and installed a new system on the new drive. The new system didn't work, so I swapped back...and it refused to boot from the old drive!!! So I got to reinstall that old rig from scratch in one night...)

Better to update everything to current, and have everything just download and work.

BUT!!!

OBS 27 to 28 specifically, was a big deal. It changed from an outdated (even then) version of the Qt graphics framework to a newer one, and that broke pretty much all the plugins. On the developers' side, it was a relatively simple matter of rebuilding them with the updated framework and republishing, but the abandoned ones that still worked, didn't do that of course, and the users were not notified that there was anything special about this particular update, until their entire rigs crashed and burned.

And burn they did! The old plugins failed to load with the new Qt, which meant that their settings were not loaded either. And because their settings were not loaded, OBS didn't save them when it overwrote the settings file. So even when people downgraded back to what they had before, all of their settings were still gone. "Hope you backed it up recently!"

So, set your current rig aside, untouched, unchanged, and still running as-is, and build a new one with all-current versions. Refer to the old one to make it work the same way, but don't change the old one at all.

I have not heard good things about running OBS on any kind of Apple laptop. They're thin and light, and don't have any other options. So they overheat quickly, throttle back, and can't keep up with production anymore. Maybe you can get away with it because you're not using the processing-intensive video encoder, but I'd still look at either a desktop tower or a "Mobile Workstation" laptop.

Mobile Workstations are thick and heavy because they have an actual cooling system! *That* is what allows them to support a constant load (like video encoding) for more than just a few minutes. And I think you'd be hard-pressed to get one that (legally) runs a Mac OS.

Fortunately, Linux is pretty similar to Mac under the hood (both based on Unix), so if you MUST have a laptop, maybe it wouldn't be too much of a switch to wipe off the Windoze that a Mobile Workstation comes with, and install a flavor of Linux instead.

Ubuntu Studio comes with a TON of media-production stuff preinstalled and working; you just have to add your favorite plugins for OBS and put it all together:
 

AaronD

Active Member
It doesn't have the "else" function so you will need to create two macros. One to hide the projector scene "if" the Main scene is current, and one to show the projector scene "if not" the Main scene is current.
A slightly different way is to have the second macro be "If not" the first macro. That allows you to change the logic in only *one* place if you need to, and not have to copy it to the other.
 
Top