Virtual PowerPoint Greenscreens! Change a PowerPoint Slide and Change an OBS Scene - automatically!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey friends i'm scott hanselman and i'm doing a cool presentation on my youtube here i'm talking about stuff and there's animations happening i'm going over to the next slide to talk about.net and now i'm over here and i'm saying something and i'm doing a thing and then what i'm in a circle that's cool and then wha i'm back over here that's pretty cool right lots of premiere lots of hard work video editing zero that was all done in camera let's talk about how we did it hey friends uh now i'm back over here i'm going to do a screencast and try to explain to you a thing that i made that makes me happy so i do a lot of presentations like this and i use a tool called obs and obs i've done other videos on you can check it out you can see me here and i'm talking and i've got these different scenes and scenes are just layouts of different components so for example a speaker plus an image plus a microphone can be a scene and i can move around in my scenes like this say here's me over here and there's some stuff there and here's me here it's kind of cool now right now i'm doing a screencast of me in this tool that i like to use now there's lots of different ways to do really effective screening casts sometimes people will go and put themselves in the corner i do that a lot you'll see me do stuff and i'll have a screen cast but i also do a lot of powerpoints and sometimes when you're in a powerpoint you wouldn't mind having yourself in there but i tend to put myself in the corner so we had an idea that what if you could be a little bit more in control of what your powerpoint looked like so what if you could do something like this what if i could have a green screen and i could put myself in that green box that'd be really cool so what i can do i can put that green box up on one screen okay and then i could make myself really small i could take myself here in obs go and make myself small and that would be cool all right and then i could do something like this so now i'm in that box what we did here is we did a display capture of that screen that the powerpoint is on and then put myself there and in display capture we say filters and we do a green screen now there's a couple of small issues you can see that this chair over here looks goofy i can fix things like that by changing my similarity so there you go now i fixed that right how green is the green that i want to pick i can find a nice there you go i fixed that and that is a chroma key effect filter that you can put on so i'm saying take the powerpoint punch out the green and then i made a little box and i put myself in that little box so that's really cool but the missing part is that when you do a powerpoint sometimes you have cool slide animations you have cool slide animations so let me show you a cool slide animation and put that on the primary monitor but then it's like hey here's here's the thing now i'm going to make it small and now i'm going to make it show some things and now i'm going to make it go over here now i'm going to make it go in a box so then you can imagine a world where i would have a bunch of slides that would look like this and what i want to do is i want to change my scene in obs each time we do that so that'd be cool so then i could potentially do something like this so i've got my thing over here and i could say look there's my name that's the powerpoint slide and then i could go like this but watch i go to the next slide my head's giant so i need to go to the next scene in obs to make sure that it fits then if i go over to that one with a with a circle in it how do i get over there well i need to make myself go over i need to drag myself over there see here i am then i punch a hole in this circle so now i have a situation where i'm changing slides in powerpoint and i'm changing scenes in obs and that's really annoying so i solved that problem by pushing two buttons change the slide change the scene change the slide changing it was really annoying so then we had the idea hang on couldn't i automate obs could i tell the open broadcasting software to change the scene automatically well you can do that in some ways you can use a stream deck and you can push the button that's a way of automating it but obs also has a thing called a websocket server so if you go to tools and you have this extension that says websocket server settings it listens on port 444. it's basically an api server then now i can tell it to do stuff but how would i tell powerpoint what to do well what if i could go into powerpoint and then in the notes field i could put a little thing i just decided to say obs colon this is where people put their notes right so i'll just put the name of the scene i want in the notes field so then what i want to do is i want to say when the slide changes look for a text that says obs colon grab the scene and then change the scene in obs so i need a little application that will do that little bit of orchestration so what i did is i took a little bit of code from two of my friends first c sharp fritz lovely streamer who has some code that shows how to talk to obs which uses a thing called obs.websocket.net oops which is written by alexander schmid so kudos alexander so there's a little library there and then some code from jimmy engstrom that shows how you can connect to powerpoint and an any event that powerpoint has so powerpoint can do next slide or this or that or whatever and then you can pull information out of the notes so could i combine those things find out i will go over here now again this is a screencast a little different than what i usually do but i still think it's pretty cool plus we're less than 10 minutes so we're gonna get this whole thing done in 10 minutes and you're going to know how to do this this is not a product this is kind of a thing for coders right now but i'm working on making it something else so i've got a and it's probably not very good code this took about 90 minutes to write um we're going to talk to powerpoint and we're going to listen to obs we'll look at that in a second and i say hey connecting to powerpoint dot dot dot set up my event let me know when the next slide shows up let's connect to obs i'll show you that in a second and then we go and we say hey i have moved to slide number two then we look at our notes we look at the notes inside of our powerpoint to see the text for some reason the text starts at shapes at two you can blame them for that i don't know i thought it would be at zero or one if there are notes then we see if the notes start with obs colon if it does we read that line yank out obs colon and then we blindly throw out that scene over in the notes so what's cool about this is if we look back at obs and then we look at our slide and we see here local speaker with desktop local speaker with desktop when those line up things just work okay and then the way that we communicate with obs is pretty interesting it's very simple remember that there's an obs websocket server listening on port 444 so all we do is we connect to that server and then we call set current scene and then there's a little bit of cleanup code there that's nothing to worry about so this is not that complicated let's see what it looks like i'm going to run this so this is going to run and i'll put it over here and then i'll put me here and then my powerpoint is here i'm going to run it on this other monitor so watch okay so that just popped up this is my camtasia that i'm using to record with so you can ignore ignore that i'm using that to record so what i'm going to do here is notice that i'm on slide one of my powerpoint it's a big green powerpoint you can see it says slide number one over here i'm gonna hit slide two now i zoom in there hit slide three nothing happens so it changes to a scene that i'm already at side four is the same now slide five over here i've got a little bit of green here that i might need to work on that's called spill and i can go into my filters i can change my chroma key and i can maybe adjust that a little bit make it look better maybe gradients aren't a thing we're going to want to do but then look at that i'm over here i'm over here i zoom off into the now i'm in a circle look at that how did i do it not complicated just a powerpoint slide with a hole in it remember it looks like this if i can see look at that where am i can't see me at all that cool so this i think is super fun but it's worth noting that the uh the target audience for this product people my age who are me is kind of who i'm focused on primarily as a goal audience but i think it's kind of neat it could be an obs plug-in it could be a powerpoint plug-in but there's not much going on here this is real typical left-hand right-hand code get some information where do we store it could have put in a database could it put in json didn't need to put it in the notes field of powerpoint grabbed an event could have been pushed from powerpoint into obs could have been pulled from an obs plugin pulled from powerpoint into obs and then changed the scene but in this case did it with an orchestrator this orchestrated application and we did that with that little bit of code that we saw from our and we did that with that little bit of code that we saw from our friends uh jimmy and c fritz thank you for your help and then i put it up here at powerpoint obscene switcher this is not an executable yet but i'll go and i'll put in a little uh ci cd they call it continuous integration continuous deployment and i'll have this thing pop-up executables if you want to play with it two hours of code not a product so lower your expectations i thought this might be fun it made me happy because i was doing it and then i went and then there was no one here that would care so maybe you care and that's why i recorded this uh thank you very much and please subscribe if you like things like this and if you don't uh just stop with the down votes it's just so negative very negative thank you so much bye
Info
Channel: Scott Hanselman
Views: 46,990
Rating: undefined out of 5
Keywords:
Id: ciNcxi2bPwM
Channel Id: undefined
Length: 12min 53sec (773 seconds)
Published: Mon Sep 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.