Resource icon

How to: Share video and audio between two or more OBS Studio instances

Possible use-cases:
Stream and record at different frame rates
Stream and record with or without overlays, alerts, etc ("isolated recording", or "selective recording")
Record 120+ FPS with multi-track audio (unsupported!)
Set up a "panic button" to prevent banned words and pictures from being streamed live

Prerequisite software
OBS Studio, portable version (visit https://obsproject.com/download and click "Download zip")
OBS Studio, either an installed version or a second portable version
VB-Audio CABLE https://vb-audio.com/Cable/index.htm (just the one free cable, no need to buy the rest)


After you've installed VB-Audio CABLE, extract OBS Studio to any folder of your choosing (I chose C:\Apps\obs-studio-portable\).
1extract.png

Create a new "Text Document" and name it "portable_mode.txt" without quotes. Make sure it's portable_mode.txt and not portable_mode.txt.txt.
2portable.png


If you want to use two portable instances, each with their own settings, you can now copy the entire folder as-is. I accidentally broke my non-portable install in the act of writing this guide, so I'll copy the folder and call it obs-studio-portable2.

Now let's run both instances side by side. Navigate into the bin\64bit folders and run obs64.exe from both folders.
3sbs.png

Teling them apart may be difficult now. I'll set their respective themes to Acri (instance №1) and Rachni (instance №2) in Settings>General.
99theme.png



Now I'm going to share video between instances. I'll use "osu!" (the rhythm game) as an example.
I'll add a game capture source and point it at the osu! executable, then hit Ctrl+F to stretch to canvas to make it easier to see.
5osu captured.png




Now I'll start virtual camera.
virtual camera start.png


Now, on the second instance, I can add a new Video Capture Device source and select OBS Virtual Camera to pull the video feed.

video capture device source redone.png



If you want more than a single video feed, use the obs-virtualcam plugin, found here: https://obsproject.com/forum/resources/obs-virtualcam.949/
You can create virtual cameras of individual sources or scenes with it, up to 4 in total.


Now let's worry about the audio. Remember the VB-Audio CABLE software we installed a while ago? On the first obs-studio instance (the one capturing the game), go to Settings>Audio and select "CABLE Input" as the default monitoring device.
cable.png


Press OK to save the settings, then go to Edit > Advanced Audio Properties and enable monitoring (Monitor and Output) for all the sources you'd like to forward. This is your opportunity to isolate audio sources - if you don't want the second instance to have mic audio, for example, you can choose not to monitor it, so it will only be output on the first instance.

monitor-and-output.png

After you did that, add a new Audio Output Capture source on the second (receiving) OBS Studio instance and point it at CABLE Input.
Screenshot: https://files.catbox.moe/mgmsi1.png
Screenshot 2: https://files.catbox.moe/w2a27y.png
Note that the second instance will capture your desktop audio and mic audio by default, so go to Settings>Audio and set both to "Disabled" if you don't want that.




Sidenote: how to do a "panic button"

Panic button is trivial: make a hotkey that toggle-mutes all audio on the second (receiving) instance, set audio sync offset to +1500 ms, then add three or less "Render Delay" filters to your virtualcam video, 500ms each. (Change audio sync offset to match the total delay added by your video filters.) You will have a whole 1500ms to react and hide your entire video and audio feed without having to completely kill the stream if someone says or shows something inappropriate. (Note that this costs a lot of VRAM, so watch your VRAM usage in Task Manager. If you run out of VRAM, use shorter render delays, or lower your resolution or frame rate.)
render-delays.png



I was going to include a section on how to also do this with NDI, but it broke on me. There was also supposed to be another section on how to do this with projectors, which use the least amount of CPU time and don't lose any quality, but scaling them properly is incredibly annoying, so that will have to wait until the options to scale projectors pixel-perfectly are added. (short version: you can create projectors and capture them with the other instance with window capture or game capture, but good luck scaling them right - if you're off even by 1px, you'll enjoy lots of blur from the lossy scaling they use. Have fun.)
Top