This OBS Plugin wraps the OBSApi in Python and provides an embedded Python environment for development of custom Python sources.
This allows you to create custom sources using easily editable Python scripts.
This project is a fork of https://github.com/TheAndyRoid/PythonPlugin, and brings certain improvements:
- Checkout and compile with Visual Studio 2013 directly, no other dependencies.
- Easy copy/paste installation, integrated with Python and other necessary libraries.
- Fix some bugs in ExampleScripts.
But, this project is not completed yet, for example, missing AudioSource Python wrapper. It is written by pure Python C API, the pro: it's a good example to show how to write a Python Wrapper, the con: there is no boost::python magic thus no power to make the Python wrapper neat and clean.
Here are the running gifs of ExampleScripts:
DateTime Demo
ColorSquare Demo
Before play ExampleScripts, you should make sure:
- OBS version >= 0.659b, and is 32 bit
Then, follow the steps:
Click "Plugins" button, make sure the PythonPlugin is loaded successful.
Right click in the blank white area below "Sources:" label, add a Python source.
Enter a simple name for this source, then click OK.
Here is the PythonPlugin GUI, which is built by tcl in Python. Click "Browse" button and select "ColorSquare.py", make sure your settings are identical to this instruction. Finally, before click "Create" button, don't forget to click "Save" button.
Click "Preview Stream" button on the OBS GUI. Wow, your demo is running! Press key "W" "R" "G" "B" on the keyboard and enjoy it.