Obs python scripts examples

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Collection of dirty python script for Open Broadcast software

Prosperelucel/obs-scripts

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Prospere’s dirty scripts for OBS

Collection of dirty python script for Open Broadcast software. I’m not a professional developper, I do this on my free time for friends, I’m just a French guy who love «la bidouille» 🙂

Important : Currently most of the script will NOT work in «Studio mode».

Installation and dependencies :

  • Install Python27
  • Open command prompt or a terminal (windows key + R, type «cmd» and enter)
  • Go to your Python27 folder in the command prompt (cd c:\Python27)

All the script requiere the python library obs-websocket-py

python.exe -m pip install obs-websocket-py 

Python27 + Streamdeck Usage :

  • Execute the script with Pythonw.exe for silent execution (no console showing)
  • On Windows explorer, right click on the python script, select «Open With» and «Choose another app»
  • Tick the box for permanently use the same app, go «find on the computer» in the bottom list and finaly select pythonw.exe in the c:\Python27 folder
  • Now simply add the main script to your Streamdeck using the app shortcut
  • Or if you don’t want to change the windows default execution for python file you can add this line to your Streamdeck app launch button :
"C:\Python27\pythonw.exe C:\Script\Yourscript.py" 

Trigger a sequence of scenes regarding a list and a config file

Edit Sequence_SCENES_Config.py and replace with your obs-websocket password

host = "localhost" port = 4444 password = "password" 

edit the scenes_list and transition_list with your own scene/transition

scenes_list = ["scene_01", "scene_02", "scene_03", "scene_04","scene_05"] transition_list = ["Slide", "Fade", "Luma Wipe", "Fade to Color Black", "Fade to Color"] #Transition Random 

To start the script launch Scene_Sequence.py with a Streamdeck or with the Windows explorer

Capture a picture of the current active scene and save it into a specific folder/file Then switch to a «freeze frame» scene

Edit Freeze_Frame_Config.py and replace with your obs-websocket password

host = "localhost" port = 4444 password = "password" 

edit the freeze_scene and file_path with your own

freeze_scene = "Freeze_Frame" file_path = "c:\_Stream\Replay.bmp" 
  • In Windows explorer, go to your file_path and create and empty image, name it Replay.bmp
  • In Obs Create a new scene with the same name (ex: Freeze_Frame) and import the empty image.
  • I suggest to create a new transition for this effect like «Fade to White»
  • Right click on the «Freeze_Frame» scene and set a «transition overide» to Fade to White

To start the script launch Freeze_Frame.py with a Streamdeck or with the Windows explorer

03 — Random Text Generator

Change the content of a Text source (GDI+) randomly regarding multiple text list.

Edit Random_Txt.py and replace with your obs-websocket password

host = "localhost" port = 4444 password = "password" 

edit the source_txt with yours

source_txt = "my_text_source" 

edit the content of the 4 texts lists with your «funny words» lol xD If you want to use less list, leave at least two empty lines inside the .txt file otherwise the script will not work

  • Create a text source with the source_txt name (ex : «my_text_source»)
  • Right click and transform your source, Edit transform, set «Positional Alignment» to «Center»
  • Edit the text «Properties» and choose your text style and Alignment.

To start the script launch Random_Txt.py with a Streamdeck or with the Windows explorer

04 — Transform source with Gamepad/Joystick

Edit the script and replace with your obs-websocket password

host = "localhost" port = 4444 password = "password" 

edit the «scene» and the source you want to move with yours

scene = "Scene A" source_name = "source_name" 
  • Right click on the source and setup transformation settings to «No Bounds» and «Center alignement»
Python.exe -m pip install pygame==2.0.0.dev10 

To start the script launch Transform_source_joystick.py with a Streamdeck or with the Windows explorer

Xbox one controller Layout:

  • Left Stick / Dpad : Move source
  • Right Stick : Rotation
  • A : Toggle visibility
  • B : Reset Position
  • X : Reset Rotation
  • Y : Reset Scale
  • LB : Mirroir Scale X
  • RB : Mirroir Scale Y
  • LT : Zoom Out
  • RT : Zoom In
  • Start : Toggle on/off filter (last filter on the source)
  • Select : Reset + exit

Create a shake effect on a source

Edit the script and replace with your config

#### CONFIG #### host = "localhost" port = 4444 password = "password" #### OBS CONFIG #### scene = "Scene_name" source_name = "Source_Name" random_position = 10 random_rotation = 5 toggle_txt = "Shake_Source_Toggle.txt" timer = 0.02 
  • Right click on the source and setup transformation settings to «No Bounds» and «Center alignement»
  • To start the script launch Shake_Source.py with a Streamdeck or with the Windows explorer
  • To stop relaunch the script

Instant disables all sources on a scene. You can set an «exception list» to not disable certain sources

Edit the script and replace with your config

scene = "Scene_name" exception_list = ["not_this_source", "not_this_one","not_me"] host = "localhost" port = 4444 password = "password" 
  • To start the script launch Disable_all_sources.py with a Streamdeck or with the Windows explorer

Toggle visibility for a sequence of sources, you can set it to Random or repeat or play once

Edit the script and replace with your config

######################################################################################## #######################################CONFIG BLOCK##################################### scene = "Scene_name" sources_list = ["01", "02", "03", "04", "05","06","07","08"] transition_tempo = 0.1 random_mode = True #False : Sequence mode / True : Random Mode repeat_mode = True #(Sequence mode only) False : Play sequence one time / True : Loop Mode for sequence clean_sources_at_start = True #Disable all sources in list at start host = "localhost" port = 4444 password = "password" toggle_txt = "Sequence_SOURCES_Toggle.txt" rng_txt = "Sequence_SOURCES_RNG.txt" ######################################################################################## ######################################################################################## 
  • To start the script launch Sequences_SOURCES.py with a Streamdeck or with the Windows explorer
  • To stop relaunch the script (if repeat or random mode)

Источник

Читайте также:  Html символ больше меньше
Оцените статью