/PythonPlugin

OBS Python Plugin

Primary LanguageTcl

Introduction

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.

Running Demo

Here are the running gifs of ExampleScripts:

DateTime demo

DateTime Demo

ColorSquare demo

ColorSquare Demo

Usage Instruction

Before play ExampleScripts, you should make sure:

  • OBS version >= 0.659b, and is 32 bit

Then, follow the steps:

Plugin loaded

Click "Plugins" button, make sure the PythonPlugin is loaded successful.

Plugin add

Right click in the blank white area below "Sources:" label, add a Python source.

Plugin enter name

Enter a simple name for this source, then click OK.

Plugin colorsquare

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.

Plugin colorsquare running

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.