How to stream virtual reality to Youtube

As you already know, we of Immotionar re organizing a small event here in Turin about VR & AR, called Disruptive Technologies Conference. Since we’re sold out, we’re planning to create a live stream of the event, to show our fantastic talks to people that can’t attend it. This means that we’ve also to stream our virtual reality demo game, with its audio and video on the same PC where we stream the seminar slides and the speaker talking… but, how to stream all this correctly?

virtual reality kinect game
Our new futuristic demo game for ImmotionRoom system… look at that explosive Tron candies!

After some tries, we got this solution. First of all, you have to create a Youtube live event or live streaming, as described in this guide. It’s not that hard, you just tell Youtube you want to start a live stream, then select when to start the event, if you want it to be public or not (if you just want to make a try, please set is as Private) and customize all stream features. Notice that to start a live stream you should have a Youtube verified account (so you have to provide Google your phone number or use some dirty hacks). Once the live stream has started, you will notice that Youtube says that it is still offline. The reason is that your stream is technically on, but there is actually nothing sending data to Youtube.

Youtube live stream offline
Everything is OK, but nothing is OK… the stream is live but nothing is actually shown

To start the stream, you’ll have to use some recording/streaming software, among which I use OBS (Open Broadcaster Software), because it’s good and it’s free (and open source). OBS interface is pretty simple: in its GUI you can see a great panel with the preview of what will be sent to the stream (the big panel), with under that the controls to set what to stream.

OBS GUI UI
Open Broadcaster Studio, in all its magnificiency! (sorry for Italian interface)

Right click the “Scene” panel and add a new scene. Then select the scene, go to the “Sources” panel and select “Monitor Capture”. Right click the newly created capture and select “Properties” and choose the main monitor from which you want to stream. Here the concept is pretty simple: we’ll launch an Oculus game, which will mirror on the main screen of my PC. OBS will take this mirror and will stream it to your Youtube live broadcast. If you made everything the right way, you should see the preview of OBS showing the actual content of your screen (if it is the same screen of OBS, you should see that strange endless loop image as above). If you want, OBS is customizable enough to compose different video sources in a single stream: we use it to stream the video composed of the player moving in front of the Kinect (of our ImmotionRoom system) and the visuals of the game.

virtual reality Oculus Kinect
A sample of one of our typical streams: Max has just made a smart move and made 500 points… really great!

To make this, just add more “Sources” to the same scene and select the portion of the image area that each source should occupy in the output stream, modifying the red handles of the source in the preview window that appear when you select that particular source.

OBS stream image
This screen seems identical to the previous one, but if you look closely, I’ve selected one of the sources (“Cattura schermo”) and a red rectangle is now surrounding the corresponding stream image in the preview section

Ok, enough for the visual part. Let’s switch to the audio now. Take a look at the lower Mixer panel and configure which audio has to be streamed. Take care to go to the settings of the Desktop Audio section and select which output device audio has to be included in the stream. If you just want to play the audio of the Rift game, selecting Rift Headphones should be enough, but if in your live stream you want also to show other stuff (e.g. a video played with VLC), it’s better that you re-direct your Rift audio to the windows main playback device (as we have seen yesterday) and then select this device as the audio source for OBS. If you want, you can also modify Mic settings to the stream, so that you can also voice over while you play!

OBS audio
Select the properties of Desktop Audio to select your favourite audio device whose audio has to be streamed

If you are here, you have all your stream correctly set. You have only to say to OBS to stream to Youtube. So, click on the main Settings button and select the “Stream” tab. Say to OBS that you want to customize your streaming server and copy as settings the ones that you find in your offline live streaming page on Youtube.

Youtube streaming data OBS
At the bottom of the live stream page on Youtube, you can find the server and the key of this stream… these are the necessary data for OBS streaming
Youtube OBS server streaming
Select settings, stream, customize streaming server and then put the Youtube data inside this section (sorry if OBS in this picture is all in Italian!)

Confirm everything and then start the streaming in OBS! At this point, after some seconds, you Youtube stream should figure as “online”: minimize OBS window (or move it away from the screen being captured) and start making your live stream: start some VR games and play them, with your public seeing everything you’re doing. You can also talk, play music and video… and everything will work like a charm!

The stream should have circa 10 seconds of delay from your live performance but it should be all right. And that’s all… hope you liked this short tutorial…if it is so, please like and share this article!


Disclaimer: this blog contains advertisement and affiliate links to sustain itself. If you click on an affiliate link, I'll be very happy because I'll earn a small commission on your purchase. You can find my boring full disclosure here.

Releated

playstation vr 2

The XR Week Peek (2024.03.26): Sony halts production of PSVR 2, Meta slashes the price of Quest 2, and more!

This has been the week of GDC and of the NVIDIA GTC, so we have a bit more pieces of news than the usual because there have been some interesting things announced there. Oh yes, also IEEE VR had its show. Actually, a lot of things happened for tech people in the US, which is […]

We need camera access to unleash the full potential of Mixed Reality

These days I’m carrying on some experiments with XR and other technologies. I had some wonderful ideas of Mixed Reality applications I would like to prototype, but most of them are impossible to do in this moment because of a decision that almost all VR/MR headset manufacturers have taken: preventing developers from accessing camera data. […]