Now is show you how to connect to OBS so we can confirm that this server URL and this stream key is correct and actually working. So for that you're gonna have to learn a little bit about OBS and the first step is to install OBS. So go ahead and Google OBS or go directly to OBSproject.com and choose whatever is your machine. After you have done that go ahead and open OBS and I suppose if it's your first time you're probably going to be seeing a black screen here so you're not going to be seeing this cursor at all. So I'm going to quickly show you how to set up a scene and capture your desktop display right.
So go ahead in the lower left corner where you have the scenes tab and click on the plus icon And now go ahead and give your scene a name. So this is going to be OBS demo for me, for you it can be whatever. Click OK. And now make sure this is selected. And now you can see I have a black screen as well.
And now you have to add a source. So go in this second tab here and click on the plus icon. And go ahead and select whatever it is for you, which is in my place of Mac OS screen capture. So if you're on Mac, it's going to write something like this. If you're on Windows, it might just write screen capture or Windows screen capture so make sure you select that like this and the name doesn't matter just click OK and now you go ahead and select your display monitor right so this is my MacBook and this is my external monitor.
So just change these options until you can see your screen in this little box. And go ahead and click OK. Great, so if you have the same case that I do and that's that the resolutions don't match, what you can do is just kind of drag this and then you can see that you have this little points here where you can adjust it to fit the screen so there you can see how I can drag this and the line it's it fits the entire screen and there we go this is my monitor I am recording this right and now you can you can do the same thing to add your microphone if you want to. So you can click on this sources plus icon and then select audio input capture if you want to. So for now I'm just going to demonstrate how to do it on screen capture.
You can Google OBS tutorial if you're really interested in this. And now I'm just quickly going to go over these controls here. So what's important is that you set up your settings correctly. So in the general tab it doesn't really matter what you do. What does matter is in the video tab.
So in here I recommend that you try and do this with 180 resolution. Right? So this is my native resolution. 1, 440. And if you select one resolution here, make sure that you also select the same resolution for the output.
So these two need to be the same. And if I change this resolution, for example, you can see how my canvas is now much higher so I have to expand this so it fits the entire screen right so if you want to you can use the exact same method in the video tab to lower your resolution so that's gonna be faster streaming and less problems because this is not some high quality, right? And then when you lower it, you have to go ahead and use this little red markers here to align it to your canvas like I'm doing right now. And then in my settings here, let me go ahead inside of the output here and make sure that you select output mode to be advanced like this. So you can see all these options that I have.
And now the streaming tab is important for us because this is what's actually going to be sent to our ingress. So make sure you use an X264 video encoder like that. Make sure that your rescale output is not selected. And for the encoder settings, this is what I use. So my rate control is CBR and my bitrate is 3500 kbps like this.
And this CPU says very fast. I don't know if that means anything to you, but if you want to, if you have the option, you can select it. If not, it doesn't matter. I don't believe it. And in the recording tab right here my type is standard, this is my recording path, and this is my video encoder like this.
So those are my options if you are interested in them. And what we have to do now is we have to copy the server URL and we have to go inside of the stream tab and inside of service make sure you select custom and then paste that inside of your server here and then go ahead and copy the stream key and go ahead and paste it here like this. So make sure that what you have here matches what you have here and that's it just click OK and then in the controls tab just click start streaming like this and in a couple of seconds right here you can see how I have my connection and you can see that I'm sending some packets meaning that we have successfully connected our OBS to our Ingress and you can confirm that by going inside of your LiveKit analytics and go inside of egress and ingress here and I'm gonna go ahead and refresh this a couple of times and at one point you're gonna go ahead and see this go from inactive to publishing and you're gonna see the duration so obviously I have some more here because I've been trying this off my screen but you should probably only have one or two right and one of them should have a status of publishing and I think you should only have one active session for it So if you go ahead and refresh this a couple of time you should be seeing the new duration, the new status and stuff like that.
Great! And if you go ahead and stop your stream it should stop successfully right? And then when you refresh after a couple of seconds or minutes here, this is gonna go back to inactive. Right? And then if you go ahead and generate your connection again, remember that you have to use the new string key inside of your OBS Studio.
Great! So I hope that kind of cleared it up and you can see we successfully connected we have some information about that here and now what we're gonna do is we're gonna finally use that connection to create our stream player and actually render our stream on this screen right here.