Resource icon

OBS Python Powerpoint slide window navigation using OBS hotkey 1.0

juria90

New Member
juria90 submitted a new resource:

Powerpoint slide window navigation using OBS hotkey - This python script allows you Powerpoint slide navigation within OBS.

I was using OBS for live broadcast for Church Service.
I have been using Powerpoint to show the slides even before OBS
and using one computer, navigating Powerpoint and OBS at the same time was a challenge.

So, I searched solutions to do that.
One of the candidate was AutoHotKey, but OBS didn't work that well with AutoHotKey,
meaning when I wrote script to control OBS from AutoHotKey, OBS eats up the keys,
even though Powerpoint works great with AutoHotKey's Send() command.

So, I dig...
Read more about this resource...
 

Gary V Carter

New Member
Absolutely perfect idea! But I need click by click instructions to get it to work! (I expect others are the same.) How about a YouTube walk through? Thank you so much for sharing!
 

Wil Brown

New Member
I have the script loading in OBS but nothing appears in the Settings > Hotkeys.
Running OBS 25.0.8 64-bit

A little help?
 

WBE

Member
Probably either Python or the PowerPoint Slide script has not been installed correctly.
If you go to Tools, Scripts, is the script at the Loaded Scripts list?
If not, make sure the script has been copied to the obs-studio\data\obs-plugins\frontend-tools\scripts folder.

On selecting the script at the Loaded Scripts list, do you see a description right to it?
If not, have a look at the Python installation at the Python Settings tab.
- On Windows make sure you have Python 3.6 installed. Newer versions are available but only Python 3.6 is supported.
- If your Windows version is 64 bits, make sure the Python version also is 64 bits.
- Have the Python Install Path point to the root folder of the Python installation (in my case C:/Users/WBE/AppData/Local/Programs/Python/Python36)
 

lupee

New Member
I'm like the same problem in OBS 25.0.8 64-bit.

Nothing appears in Settings> Shortcut Keys.

: /
ppt_slide.py] Traceback (most recent call last):
[ppt_slide.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\ppt_slide.py", line 3, in <module>
[ppt_slide.py] import win32com.client
[ppt_slide.py] ModuleNotFoundError: No module named 'win32com'
 

Lyons800

New Member
I am still getting an error after calling: ' pip install pywin32' & 'pip install pypiwin32'.

The error is :
[ppt_slide.py] ModuleNotFoundError: No module named 'win32api'

Any ideas?
 
A suggestion for a future enhancement {though not sure OBS can handle this}
I too learned quickly and no handle our HoW live stream broadcast, using PPTx with combination of prerecorded videos and live video. I've been manually advancing PPTx slides just fine. But recently, using Adv Scene Switching, I've now automated many of the pre-recorded video endings, then move to next scene. Ideally that scene change would ALSO involve a PPTx slide change

So I'm not sure architecturally how to do this in a non-complicated manner. Maybe a 'custom' transition (I always use Fade) that incorporates the both the transition as well as an action (PPTx -Next in my case). I'm indifferent as to whether the order is Page change then scene change, or Scene change and first action/or simultaneous with next active Source, is teh action (PPTx in my case)
The vast majority of my scene changes also correspond with a PPTx slide change. There are times though with a PPTx slide change without a scene change... (though if I was forced between not automating PPTx page changes and creating a scene per PPTx slide, I'd unhesitatnly choose the later)
Anyway Food for thought

IF this can be done now, and I'm simply displaying my ignorance/newbie status with OBS, please point me in the right direction. Thanks in advance
 

huangrh

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.
 
James, a follow up to my comment a few weeks ago. As I noted then, I wish to go one step further in automating PPTx slide changes as part of scene changes, but NOT by using OBS hotkeys. I've come across 2 possibilities, both of which I'm wondering if/how to get get to work using (part or all) of your script. I'm referring to either Dummy-Source-to-execute-command.952 or obs-scene-execute-command-script-1.0.0.

So my question is: if I wanted a Windows command line way to call your script, what would that command line look like?
Or would it be easier/better to modify your script, vs trying to use as is? Sorry, I've no real programming background. I've reviewed the scripts, and I can figure out what it is doing, but not the nuances to play with it
 

sdevaprasad

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.
Hotkeys are not loaded?? what could be the possible reason?
 

WBE

Member
According to your first screenshot Python 3.8 has been installed. It should be version 3.6 though.
 

js2020

New Member
Thanks so much for all your comments which helped me to be able to install this script to manage PowerPoint slides, which is awesome!

Just want to share with you all the steps that worked for me:
- Using OBS version 26.0.2 (64 bit) on Windows 10

1. Download and install Python 3.6.8
https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe

Or go to:
https://www.python.org/downloads/release/python-368/
Windows x86-64 executable installer (the version that I downloaded)

When installed on your PC, note the path where it is installed, by default, it should be at
C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python36

2. Download and install pywin32 for Python 3.6
https://github.com/mhammond/pywin32/releases/download/b228/pywin32-228.win-amd64-py3.6.exe

Or go to:
https://github.com/mhammond/pywin32/releases
pywin32-228.win-amd64-py3.6.exe (the version that I downloaded)

3. Download the script ppt_slide.py and copy it to
C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts

4. In OBS, go to
Tools > Scripts
Under "Python Settings"
Set the path where Python 3.6 is installed
e.g. C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python36

5. In OBS, go to
Tools > Scripts
Scripts
Add ppt_slide.py

6. In OBS
Settings > HotKeys
It should show up with the options to set your own hotkeys to move the slides

Hope it helps!
 

sdevaprasad

New Member
Thanks so much for all your comments which helped me to be able to install this script to manage PowerPoint slides, which is awesome!

Just want to share with you all the steps that worked for me:
- Using OBS version 26.0.2 (64 bit) on Windows 10

1. Download and install Python 3.6.8
https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe

Or go to:
https://www.python.org/downloads/release/python-368/
Windows x86-64 executable installer (the version that I downloaded)

When installed on your PC, note the path where it is installed, by default, it should be at
C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python36

2. Download and install pywin32 for Python 3.6
https://github.com/mhammond/pywin32/releases/download/b228/pywin32-228.win-amd64-py3.6.exe

Or go to:
https://github.com/mhammond/pywin32/releases
pywin32-228.win-amd64-py3.6.exe (the version that I downloaded)

3. Download the script ppt_slide.py and copy it to
C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts

4. In OBS, go to
Tools > Scripts
Under "Python Settings"
Set the path where Python 3.6 is installed
e.g. C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python36

5. In OBS, go to
Tools > Scripts
Scripts
Add ppt_slide.py

6. In OBS
Settings > HotKeys
It should show up with the options to set your own hotkeys to move the slides

Hope it helps!
Thank you, it worked.
 

DutchNeb58

New Member
I was not so lucky, I added all the results of the script...


[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 60, in __init__

[ppt_slide.py] _LoadDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 110, in _LoadDicts

[ppt_slide.py] f = open(os.path.join(win32com.__gen_path__, "dicts.dat"), "rb")

[ppt_slide.py] FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\dicts.dat'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 143, in GetGeneratePath

[ppt_slide.py] os.stat(fname)

[ppt_slide.py] FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\ppt_slide.py", line 3, in <module>

[ppt_slide.py] import win32com.client

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\__init__.py", line 11, in <module>

[ppt_slide.py] from . import gencache

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 660, in <module>

[ppt_slide.py] __init__()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 62, in __init__

[ppt_slide.py] Rebuild()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 647, in Rebuild

[ppt_slide.py] _SaveDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 69, in _SaveDicts

[ppt_slide.py] f = open(os.path.join(GetGeneratePath(), "dicts.dat"), "wb")

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 145, in GetGeneratePath

[ppt_slide.py] f = open(fname,"w")

[ppt_slide.py] PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

[StreamQR.lua] API call: https://render.streamqr.com/image?p...&bgcolor=ffffff&data=https://streamqr.com/OBS

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 60, in __init__

[ppt_slide.py] _LoadDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 110, in _LoadDicts

[ppt_slide.py] f = open(os.path.join(win32com.__gen_path__, "dicts.dat"), "rb")

[ppt_slide.py] FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\dicts.dat'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 143, in GetGeneratePath

[ppt_slide.py] os.stat(fname)

[ppt_slide.py] FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\ppt_slide.py", line 3, in <module>

[ppt_slide.py] import win32com.client

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\__init__.py", line 11, in <module>

[ppt_slide.py] from . import gencache

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 660, in <module>

[ppt_slide.py] __init__()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 62, in __init__

[ppt_slide.py] Rebuild()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 647, in Rebuild

[ppt_slide.py] _SaveDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 69, in _SaveDicts

[ppt_slide.py] f = open(os.path.join(GetGeneratePath(), "dicts.dat"), "wb")

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 145, in GetGeneratePath

[ppt_slide.py] f = open(fname,"w")

[ppt_slide.py] PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 60, in __init__

[ppt_slide.py] _LoadDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 110, in _LoadDicts

[ppt_slide.py] f = open(os.path.join(win32com.__gen_path__, "dicts.dat"), "rb")

[ppt_slide.py] FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\dicts.dat'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 143, in GetGeneratePath

[ppt_slide.py] os.stat(fname)

[ppt_slide.py] FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

[ppt_slide.py]

[ppt_slide.py] During handling of the above exception, another exception occurred:

[ppt_slide.py]

[ppt_slide.py] Traceback (most recent call last):

[ppt_slide.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\ppt_slide.py", line 3, in <module>

[ppt_slide.py] import win32com.client

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\__init__.py", line 11, in <module>

[ppt_slide.py] from . import gencache

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 660, in <module>

[ppt_slide.py] __init__()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 62, in __init__

[ppt_slide.py] Rebuild()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 647, in Rebuild

[ppt_slide.py] _SaveDicts()

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 69, in _SaveDicts

[ppt_slide.py] f = open(os.path.join(GetGeneratePath(), "dicts.dat"), "wb")

[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\client\gencache.py", line 145, in GetGeneratePath

[ppt_slide.py] f = open(fname,"w")

[ppt_slide.py] PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Python36\\lib\\site-packages\\win32com\\gen_py\\__init__.py'

Hopefully you'll be able to assist. I'd really like to control my slides outside of PowerPoint in OBS
 
Top