Question / Help Making a Composite Stream from Two Computers

Zovc

New Member
Hey, guys. I'm trying to learn how to do this for a few projects of mine. I'll list off a couple of example situations of what I want, and then try to explain what I want the end result to be:

"The Tournament"
Once I have my own place, I'll want to periodically host local tournaments and if possible, I'd like to stream them to a local monitor and possibly twitch, as well. This will be a 1v1 situation where players have their own computer and webcam set up to where they can trash talk each other but aren't able to see their opponent's screens. I plan for there to be a third computer where I will be running OBS that is able to stream a composite of both player's screens, their webcams, and possibly other overlay elements like twitch chat or "now playing" cards from music services.

Example output would be a screen with player 1's screen in the top left corner, player 2's screen in the bottom right corner, and in each of the open corners would be one of the players' webcams. Or in a game where the screen could be shared (for example, Spectator mode in League of Legends) the player's webcams could be fringe screen assets along with the aforementioned twitch chat and "now playing" card.

"The Multibox"
For the time being, I'd like to try streaming myself multi-boxing various games I like to play. I'd like to be able to have several different scenes set up in OBS. One for each of my computers' with my webcam composites somewhere on there, and also some more complex composites like "picture in picture" scenes and perhaps even a few potentially cinematic scene setups.

Example output would be Scene 3 in OBS, having my desktop's basic streaming setup scaled a little smaller, to something like 80% and 'snapped' to a corner. Then, I would overlay my laptop's monitor output (or perhaps a region of it) scaled to something like 50% 'snapped' to the opposite corner, also incorporating twitch chat and my webcam in there somewhere.

The only thing I really need help figuring out is how to take the raw stream output of OBS running on my laptop (without streaming out to the internets) and utilize it in my desktop's OBS (being the one that actually streams to my twitch). If I have to, I'll fool around with both OBS clients as the need arises. It'd just be nicer if I only needed to manage one OBS interface at a time.
 

dodgepong

Administrator
Forum Admin
Sounds like a simple case of needing capture cards to capture video and audio from another computer.
 

Zovc

New Member
I'd prefer to do as much through software/networking as possible.

Is a capture card really my only solution?
 

dodgepong

Administrator
Forum Admin
If you want it in real-time, then yes. If you want to do it with only software, then it gets complicated. You would need to set up an RTMP server and have both computers run OBS and stream to that server, the get a third computer to download the two streams and insert them side by side in OBS. And even then, there's going to be several seconds of delay between what is live and what you see coming in from the two computers. It's possible, but like I said, complicated.

You can follow some guides about setting up nginx as an RTMP server here:

viewtopic.php?f=18&t=2651
viewtopic.php?f=18&t=5873
 
Sounds like a fun project :)

Sync is going to be your major problem. As dodgepong said, if you do some of the encoding on the player's PC, and some of the encoding on a third PC, you're going to have major sync issues. Sync might not be 100% important though, only the feeds provided with the 3rd PC will be out of sync (twitch chat, etc.) and the "tournament" display screen will also be out of sync with the live action (only important if showing to a live audience, if it's just you watching the tournament screen, no biggie).

It would also be nice if none of the encoding is done on the players PC, so that it won't slow them down, require them to install software, config OBS, game/display resolution, etc. Live encoding (especially 1080p) video + having enough left over juice to play high end games will require top notch CPU's and graphics cards.

If you wanted to do it without spending ANY cash on additional hardware/software, here's how I would do it:

Run OBS on each of the gaming PC's. Run the gaming PC's at 1920x1080 and have OBS do a half scale encode/feed (960x540). OBS will "game capture" each game, as well as capture each USB webcam separately (hopefully can set webcam to 960x540 as well, if not set to 1280x720 and just crop, not scale, to 960x540) and feed them in separate RTMP streams to your third computer. So that takes care of both PC games, both webcames, perfectly in sync, audio and video, at super nice resolutions for displaying 2x2 on a 1080p display (the quality will knock your socks off, I guarantee) :)

On the third PC you would run VMware (it's still free right?) with an instance of Linux (with debian or ubuntu or whatever, full text mode, no gui). Use this guide to compile and configure nginx + rtmp to act as server. Run OBS on this same PC and suck the four RTMP streams from the linux VM. Voila, quad display, flawless resolution/quality. Stream to twitch, almost live display on the 3rd PC's monitor (out of sync with live action by a few seconds), record tournament action to hard drive, etc. etc. Sweet sweet setup.

You could do something similar with a 3x2 on the tournament display/twitch feed as well but you're really running out of resolution to do 6 equal size windows! What you could do is run each game at 1280x1024 and run a 50% vertical scale, so would end up 1280x512, then run each webcam at 640x360 (or 640x480 and just crop it, not scale it, to 640x360 in OBS on 3rd pc, or half scale 720p), that leaves you with 640x360 left over, so either a 640x360 window with twitch chat or whatever. You can run a music feed in the 1280x56 pixels left over between the live game feed. I gave it a try and it looks pretty damn good!!! I was running Windows Media Player with WhiteCap for song name and live visualizations, worked sweet.

Full res 6 window 1080p example, with everything EXACTLY scaled as to how it would appear on your twitch/tournament display: http://ecuflashking.com/1080p_gaming.jpg (download and display full screen on a 1080p display to get a sense for the quality).

1080p_gaming.jpg


^^ not me in the webcam image, just some cam I grabbed off google.

If you have live spectators physically watching the "tournament" screen then you're going to have to spend some cash if you want everything in sync with the live action :)

-Jamie M.
 

Zovc

New Member
Thanks a lot, toysareforboys! That was a very useful post you threw my way. :)

It would seem that I'm going to need extra hardware no matter how I want to go about this (currently only have one desktop which is effectively dated, but I have 10gb ram and a quad-core so it still manages to pull its weight when streaming and a laptop that struggles to run League as it is), so these projects are going to remain pipe dreams for the time being.

I might see what the best I can do with what I have is at some point in time over the holidays (tomorrow is my last day of school!), but it likely won't be up to my quality standards. Hopefully I'll be able to "install" a chroma key screen in my room at the very least. I have so many other projects piling up as it is, though, it won't be too great a loss that I can't make too much progress towards this goal right now. :)

When the time comes (and I've made some money from the nice job that I have lined up), I'll start investigating hardware more seriously. In the meantime, I'll lurk around here for information on capture cards. Beyond that, do you guys have any suggestions for Home Theatre PCs? I've done some research in the past, but there were seldom strong recommendations towards specific operating systems or software suites, or even really hardware.
 
Zovc said:
...do you guys have any suggestions for Home Theatre PCs? I've done some research in the past, but there were seldom strong recommendations towards specific operating systems or software suites, or even really hardware.
If you wanted to be super freaky and on the "bleeding edge" check out the $35 chromecast :) Google for tips on using your cell phone as a remote control, your laptop as the video server, etc :D

Another option is XBMC, runs on low end hardware (I use it on my RaspberryPi, with a 4tb USB external hard drive! lol). Runs 1080p like a CHAMP!

RaspberryPi_can_you_spot_it.jpg


(you can see my naked Pi in the lower left of the TV, lol)

There's so many great/cheap options out there. You might have to re-encode video and audio to a compatible format to make these cheap devices stream flawless (especially the audio with the Chromecast, it's super picky, look up ffmpeg for just re-encoding the audio while leaving the video untouched, works on 90% of video files).

-Jamie M.
 

jMz

New Member
I know this is an old thread but I've had an idea of how this could possibly be done; again their could be some delay issues but me and my friend are going to try this out and see how we get on.

There will be 3 computers; myself and my friend will host and screen capture on Webex whilst on the third computer, I will open up two separate incognito web browsers and join both Webex meetings; I will snap each browser in place and do a window capture and create an overlay to hide all the bits we don't want to see.

We will use mumble for voice audio but will probably lower the audio from the webex so that there is still some in game audio (however there will be two feeds so might be confusing).

Anyone think this could work? We will test it out and see how it goes and report back.
 
Top