Resource icon

OBS Python Powerpoint slide window navigation using OBS hotkey 1.0

DutchNeb58

New Member
I probably should have added, this is a recent upgrade to Office 360 version of PowerPoint. Followed to procedure a couple of times just to ensure that I wasn't messing the above described install up.
 

Joelm72

New Member
Hi All, Thanks so much for this. Been using it for months and it works pretty well. There’s just one hiccup.

When I press the hot key for the next slide, sometimes it executes twice. I have been searching for double execution of hotkeys on this forum and haven’t found anything. Is there a way to add a “wait” of 200 milliseconds so that the same input can’t be sent to PowerPoint twice?

If others have encountered this I would be happy to hear what you’ve done.

I know this sounds like keyboard chatter, but it’s a still new Dell membrane keyboard which behaves otherwise normally.
 

waicheng05

New Member
Works perfect. For those need help, below is what I did on Windows 10.

1. install OBS studio version 25.0.8
2. install python 3.6-64bit. Note the late python version does not work.
3. download the python scripts: https://obsproject.com/forum/resour...ndow-navigation-using-obs-hotkey.938/download
4. Open scripts windows from the tools dropdown menu.
5. in the python setting tab: have the Python Install Path point to the root folder of the Python installation where python.exe exists
6. use the '+' load the python scripts.
7. use setting to set the hotkeys.
8. restart obs if not work.
this method works perfectly for me, but 1 issue i facing is once i press the hotkey the slideshow animation will stop playing. Any idea regarding this issue?
Thanks alot man
 

michaeleino

New Member
working on version 27.0.1 with the guide on post

many thanks all... it is really awesome!
 

BrainSuperGlue

New Member
Just to confirm that this Python script will NOT work with the 2019 / Microsoft 365 version of Powerpoint.

All of Python 3.6 and script is installed correctly. Not sure if pywin32 needs to be updated for a different API call for 365 Powerpoint or if it is a script issue. Maybe 365 Powerpoint doesn't API identify as 'Powerpoint.Application'?

The hotkey press IS being registered by OBS though.

Here are the four different scenarios of administrator rights for OBS and Powerpoint, with the outcome for each.

1. If OBS isn’t running as Administrator and 365 PowerPoint is running as Administrator and OBS hotkeys are pressed – Elevation error occurs.
Outcome 1.png

2. If OBS is running as Administrator and 365 PowerPoint is running as Administrator, slides do not change when left or right OBS hotkeys are pressed.

3. If OBS isn’t running as Administrator and 365 PowerPoint isn’t running as Administrator, slides do not change when left or right OBS hotkeys are pressed.

4. If OBS is running as Administrator and 365 PowerPoint isn’t running as Administrator and OBS hotkeys are pressed - Server execution error.
Outcome 4.png

Will gladly help with script dev to fix.

BSG
 

BrainSuperGlue

New Member
As an API side note referencing powerpoint =win32com.client.Dispatch('Powerpoint.Application')

I had a look through the registry for CLSID / Version Independent Prog ID and came across these two.

Not sure if the API is case sensitive as my registry has PowerPoint not Powerpoint

Reg1.PNG


There is also this one as an alternative?

Reg2.PNG


Just some thoughts.

BSG
 

BrainSuperGlue

New Member
One other,

As a test, with the ppt_slide.py script (with either 'Powerpoint.Application' or ' PowerPoint.Application') in C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts and with OBS and Powerpoint running as administrator, with OBS move to next slide hotkey set to CTRL+K...

... it still didn't work.

Thoughts?
 

BrainSuperGlue

New Member
So...

With pywin32-301.win-amd64-py3.6.exe installed, slides wouldn't progress.

Uninstalled pywin32-301.win-amd64-py3.6.exe
Rebooted
Installed pywin32-228.win-amd64-py3.6.exe
Slides now progress... hurrah
To prove 301 is broken, uninstalled 228, rebooted, installed 301
Slides now progress under 301.

Conclusion - pywin32 gives me a headache.
 

k8ldbl88d

New Member
Greetings! Is there a manual/documentation for that I want to add one hotkey which is "Blank Screen" so I can force everyone to look at speaker for a moment before bringing the presentation back up?
 

k8ldbl88d

New Member
@k8ldbl88d, wouldn't it be much easier to go to a different scene in OBS or hide the Window Capture source? Both can have a hotkey assigned to.
That would be my plan. I forgot to mention to my situation. So I am ACTUALLY Projecting and Streaming at the same time. So I would have PowerPoint to be presented normally using 3rd Video cable to Projector and use Window Capture to Zoom. So I am doing a Hybrid setup for participants. For those on zoom, all I have to do is switch out to close up for Speaker. But what do I do in person? I just go to Presenter Viewer and click Black Screen. I was hoping to keep it within my fingertip of hotkey instead of moving the mouse. So that's my challenge, trying to reduce moving parts to operation.
 

jacenchewysolo

New Member
I'm a volunteer with a church AV team and I have no experience with coding. The Church will be using a Windows 11 machine while as a backup I would want to use a 2021 MacBook Air. From my understanding in these posts, the Python code here will not work too well. Could someone in this forum send me to a resource to help me either use Apple Script or python to accomplish this same change. I need to use powerpoint because the same computer is being used to project the parts of the service and the lyrics for any hymns. We may also sometimes have to embed videos into the powerpoint. The goal is to live stream. As the volunteers may change from week to week (eventually), we want to make this as simple as possible. I currently am investigating the solution posted in the SteamGeeks OBS Superuser Guide Book on pages 20 to 26. But this will not solve the issue with controlling powerpoint slides on our mirrored projectors. So this also eliminates the options of using OBS' slide viewer. This means that some form of automation is required. I would appreciate any ideas that the community could provide?!
Thanks.
 

Lawrence_SoCal

Active Member
For a HoW with volunteers, and looking for some automation to assist livestream, I strongly recommend against having 2 different Operating Systems involved, with 1 as backup for the other. That is just asking for trouble/inconsistencies, until such time as you have multiple well-trained and relatively capable OBS operators and smoothly running system and documented procedures.
And beware WIn11, as it is only sorta/kinda ready for prime time (and numerous instances of glitches (for gamers) between WIn11 and OBS). I'm still on Win10, and not planning to change to WIn11 unless/until I get a new Intel 12th gen or newer CPU that benefits from new CPU timer/scheduler in Win11. But if Win11 not an issue for your setup, then no worries.

I'm not sure from your description if you are referring to am multiple PC setup?? my thought is that getting PPTx from PC#2 over to OBS PC is too many opportunities for glitches. I set up dual monitor and prefer OBS, camera controls, and PPTx all on same system. IF a 2nd person to control PPT is needed (we don't for our services) then I'd be inclined to get something like a StreamDeck (or similar) control unit that PPT operator uses to advance/change slides, running on OBS PC [ie, I'm assuming OBS PC primary operator controls keyboard and mouse.. so just need another non-mouse input device to control PPT and I always opt for wired vs wireless for reliability/consistency reasons.. but whatever works for your situation.]
As for automating PPTx slide changes, its 2+ yrs into HoW lifestreaming, and I gave up on automating PPTx slide control due to MS Office security/API paradigm with latest Office releases. We find controlling PPTx slides, along with OBS and PTZ camera, easy enough for a single operator (though we are not projecting PPT to in-house attendees).
 
  • Like
Reactions: WBE

jacenchewysolo

New Member
For a HoW with volunteers, and looking for some automation to assist livestream, I strongly recommend against having 2 different Operating Systems involved, with 1 as backup for the other. That is just asking for trouble/inconsistencies, until such time as you have multiple well-trained and relatively capable OBS operators and smoothly running system and documented procedures.
And beware WIn11, as it is only sorta/kinda ready for prime time (and numerous instances of glitches (for gamers) between WIn11 and OBS). I'm still on Win10, and not planning to change to WIn11 unless/until I get a new Intel 12th gen or newer CPU that benefits from new CPU timer/scheduler in Win11. But if Win11 not an issue for your setup, then no worries.

I'm not sure from your description if you are referring to am multiple PC setup?? my thought is that getting PPTx from PC#2 over to OBS PC is too many opportunities for glitches. I set up dual monitor and prefer OBS, camera controls, and PPTx all on same system. IF a 2nd person to control PPT is needed (we don't for our services) then I'd be inclined to get something like a StreamDeck (or similar) control unit that PPT operator uses to advance/change slides, running on OBS PC [ie, I'm assuming OBS PC primary operator controls keyboard and mouse.. so just need another non-mouse input device to control PPT and I always opt for wired vs wireless for reliability/consistency reasons.. but whatever works for your situation.]
As for automating PPTx slide changes, its 2+ yrs into HoW lifestreaming, and I gave up on automating PPTx slide control due to MS Office security/API paradigm with latest Office releases. We find controlling PPTx slides, along with OBS and PTZ camera, easy enough for a single operator (though we are not projecting PPT to in-house attendees).
Thanks for your reply Lawrence_SoCal! Greatly appreciated! For clarification - We wouldn't use both computers simultaneously. The hope is that once the configurations for the livestream are setup on the Windows 10 pc (I think its running windows 10 as I haven't had the opportunity to play with it) but it could be windows 11, will live at the church. The 2010 or older PC that is used now lives there so the new one would replace it. We would use a dock to make the appropriate connections. The problem is that if we need to make configuration changes before the service there is a risk that someone takes the machine home. So I wanted a plan B (my personal MacBook) in case that person with the machine was late or didn't show up. But thank you for the suggestions of using a StreamDeck (wired version). It would be a laptop so setting it up to work with Microsoft Remote Desktop for remote configurations probably wouldn't work reliably, even if wake for network access is left on. They may also not want it on for security purposes. I think that it is just simpler to abandon my plan B for now at least. Thanks.
 

Lawrence_SoCal

Active Member
Laptops are subject to thermal throttling, and real-time video encoding is very computationally intensive... so putting the two together is risky.
And presuming HoW livestream is important (we had 2 different issues recently and folks got upset that livestream didn't work)... so in that vein, we purchased a dedicated streaming PC, with an AVR UPS, in an isolated network segment (so lower risk of office PC malware) .. so issues were Facebook last weekend, and new AT&T fiber not working the prior weekend but not the onsite livestream system/setup. not free but reliable... ymmv

I'm surprised you got a circa 2010 CPU to do real-time video encoding at all. I tried (when I first started with OBS) on a freshly built and optimized 2015 gaming laptop with nVidia GPU (NVENC encoding offload) and failed.
 

jacenchewysolo

New Member
Laptops are subject to thermal throttling, and real-time video encoding is very computationally intensive... so putting the two together is risky.
And presuming HoW livestream is important (we had 2 different issues recently and folks got upset that livestream didn't work)... so in that vein, we purchased a dedicated streaming PC, with an AVR UPS, in an isolated network segment (so lower risk of office PC malware) .. so issues were Facebook last weekend, and new AT&T fiber not working the prior weekend but not the onsite livestream system/setup. not free but reliable... ymmv

I'm surprised you got a circa 2010 CPU to do real-time video encoding at all. I tried (when I first started with OBS) on a freshly built and optimized 2015 gaming laptop with nVidia GPU (NVENC encoding offload) and failed.
We haven't actually done live streaming yet. We were just recording with the camera and the sound integrated into the camera then doing some editing and processing after the service before uploading to YouTube. The goal is to livestream directly to YouTube as soon as possible and it is supposed to be on a new Windows 11 PC. We shall see how that goes!
 
Top