Resource icon

OBS Python Automatic ffmpeg re-encoding (Good for learning Python API) 0.1

Automatically convert your videos using ffmpeg when they're finished recording. Specify custom flags and renaming with regular expressions. Uses the ffmpeg version found in the system path.

NOTE: objsproject.com does not allow updates to Python scripts (understandably so) but the version uploaded to this site is buggy. Please use this version instead - https://gist.github.com/miabrahams/69cfe8a8dd74ffc3e87203467c64973e



ffmpeg_obs.png



This was originally intended to be a few lines of code but it turned into something a bit more involved. I believe I pushed the plugin API to its limits! Currently, the biggest limitations I've found in the Python API are callback support, and availability of the config_ api. If someone extends the bindings let me know! (I've spent enough time on this without going through an OBS / SWIG build, haha.)

This represents an opinionated coding style using an object wrapper for the plugin. I have included a datamodel class that can make setting and getting obs_data* more comfortable. This class could be reused in other code, or used as a class member instead of through inheritance. I hope this is a helpful example of a fully featured Python plugin for anyone else learning this API!

Unfortunately I could not figure out how to automatically detach callbacks, so loading the plugin will cause a (harmless) memory error on program shutdown.
Author
Abrahams
Downloads
4,581
Views
4,581
First release
Last update
Rating
0.00 star(s) 0 ratings
Top