How to use Python to control OBS | in 5 minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back i'm your friend in saxo today we will try to do an experiment to try if we can use a python to control the obs first we create a new repository then we do a clone so what you need to do is first go to the first website you'll get into the obs with circuit repository from here we will try to download a release since we were using the linux we will just try to download the db fill after that we open the packaging and click the install button it says that it depends on obs studio so you cannot install it uh even though i still got the web circuit server settings right in here under the toss tab of my obs this should be something that you would get if you install it right now for the simplicity i won't enable the azure vacation or just click ok after that we go to the second url which will lead you to this page from here we're going to try to install packaging that's it all right after the installation let's go to the samples for this folder you got two files i guess i'll just use the first one we copied it to our main py file let's try if we can run this file it says that connected together default port 444 we didn't set the secret we didn't set a password so it's okay but the problem is how can we actually interact with obs or control or obs uh let's go to the second one i'll just do a copy again okay for this one it says websocket.com called the request to get a scene next to get all those things and for each scene in those sense we can get the the lan and we can print it out and in the end we can uh set that set to that scene okay let's just run this file let's just print out the land of the scene with two blue lines around it so we can see it clearly now you can see we got a scene which got a scene that's not new let's just um add another scene for this i'm going to call it a b say d it's just the empty scene i don't i don't care about that let's just run this software again now you can see instead of the scene we got also a pcd so that's cool at least we could get some information from our obs yeah but the problem is how can we actually control our obs well we do this by simply doing a websocket core let me write it down cool request dots here's the scene under the request we got many different functions to use for example this one creating we can create a scene omega or delete a scene item or we can get a call in a scene or we can get the recording status i think this is very important because sometimes you want to know whether your obs is recording or not okay enough gets let's call the set say the mute we can actually disable the audio external over obs for for some microphone for the microphone that you want to disable and also we can set the value of your ado channel aha we even got a function for the past pause recording this one is very important sometimes we want to pause it and we even have a result recording that's even better so with all those code let's say we consider the current scene so in another world we can switch the scene with different scene name that's good and also we can pause recording if we do not want to record at that time for example for this case i'll just uh call the post recording for two seconds then comment uh make it back that's right that's awesome that's all i could say it's awesome uh i think this week could i be able to use the python to control the obs i think it would be better if we can actually get the adu in real time so we can do some analyzation about it that'd be awesome i don't know if i can do that but for this video for this tutorial or for this experiment it is done okay thank you for your watching i will meet you at the next video bye
Info
Channel: yingshaoxo's lab
Views: 15,228
Rating: undefined out of 5
Keywords:
Id: 9AwvXLV6Tro
Channel Id: undefined
Length: 5min 30sec (330 seconds)
Published: Wed Feb 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.