python

  1. satalight

    OBS Python Shitrate!! - Decreases the bitrate of a recording / stream as audio increases. v1.0.0

    A Python 3.6 script that reduces the bitrate of the stream / recording as audio increases. Includes two versions of the script, one that looks for specific jumps in volume and another that proportionally relates high volume amounts with bitrate count. Full Description and Instructions...
  2. S

    checking obs si via code

    Hello friends, I am making a stream deck for myself, but I don't understand how to control obs si, I want to make all of the scene transitions on and off through the code, I want to make code that turns the recording on and off through the code, but I don't know how to do it, I want to write...
  3. padii

    OBS Python OBS Recording Organizer Upgraded 1.0

    Originally created by francdv23. What has changed? I freshened it up and made it working again. Additionally I added a feature that lets you choose if you prefer the "game title + recording name" file name or without any changes. Will there be any updates? In the future I will be improving it...
  4. Andrewwz

    python script doesn't work?

    I installed python3.9 built by the framework on macOS and successfully loaded the path in the OBS script. But the python file didn't work
  5. M

    Python Script to connect to OBS Websocket Server Help

    Goal of the script: Send command to OBS to make it do something, like switch scenes, change Sources, play a gif, etc. I've tried using Postman to get an example, and while I can connect, I get errors about the websocket version from the client being out of date when I try and SEND something to...
  6. D

    help with obs python script (play video source at certain timestamp)

    have a python script for OBS that makes a scene and loads a video and tries to play it. The script looks something like this: import obspython as obs import math, time, os, random hotkey_id = obs.OBS_INVALID_HOTKEY_ID is_active = 0 def script_description(): return """Random Script""" def...
  7. bradleyp

    Python - Modifying Window Capture Settings

    I'm trying to write a script to automatically update the Window Capture window when a user changes the current foreground window in Windows. This would eliminate the need to constantly change the currently selected window for recording or for replay buffer. I'm able to use obs_data_set_string...
  8. J

    Python Script wont start properly on obs

    Hi, I've created a small Python program (OBS_Python.py), and you can find the attached files. The program is designed to move mp4 files from the C drive to another drive when a game is opened + to specific folder named after the game. However, I'm facing an issue: it only prints the message...
  9. adaendra

    Error "Attempted to insert context with duplicate name"

    Hi, I have a script which automatically change scene in Python, but when I change the scene collection and come back to the one with my script, I have the following error : Here is my script Do you have any idea about what can generate this ? or a way to clear the context please? Thanks...
  10. ysmd_

    OBS crashing/long opens because of the code based on python.

    I have a code on python (3.11) from pynput.keyboard import Key, Listener import pydub from pydub import AudioSegment from pydub.playback import play is_microphone_muted = False def sound_disconnect(): songd = AudioSegment.from_mp3("mute.mp3") play(songd) def sound_connect()...
  11. W

    Obs, Python and web socket : impossible agreement ?

    Hello everyone :), I have a very important little question about the web socket in Python. We want to ensure that certain text sources in our scene are updated using the web socket in Python. However, we have been trying for several weeks without any convincing results :/. I would like to...
  12. filippoadessi

    Volleyball AI PTZ tracker

    Hello, I'm engaged with a youth volleyball club in Italy and I use OBS to stream their matches on youtube. I use my iPhones to stream a rtmp flow to a cloud server, mix flows on OBS and then restream to Youtube channel. But my live stream are static because I cannot manage pan, tilt and zoom...
  13. A

    Using OBS Websocket with Psychopy (python)

    Hi there, I'm trying to set up code components in my psychopy script that connects to OBS websocket and starts and stops recording for different routines.I've successfully ran this python code in VS code but I'm running into errors when I try and incorporate it into python. Here is my code in...
  14. ramoses

    UNICODE for Python Install Path

    I've noticed that OBS won't recognize the path where Python is installed if it has any non-ASCII characters. I've spent almost 2 hours trying to figure out why OBS wouldn't recognize Python, then another 2 hours trying to set my embedded Python with variables and pip. That is totally not user...
  15. hieunekodesu

    I cant using obs browser source with localhost flask website

    this is my code from selenium import webdriver from selenium.webdriver.common.by import By from flask import Flask, jsonify, render_template, request import time url = "https://lichess.org/oW6O03Np/black" driver = webdriver.Chrome() driver.get(url) stages = driver.find_element(By.XPATH...
  16. S

    Python Web-socket.py

    Hey I am trying to get TEXT GDI+ to change when I run my python script. source_name = "yo" # Replace with the actual name of your OBS Text source text_properties = { "source": source_name, "text": text, "textFile": "", "outline": True...
  17. D

    Field value from dock module

    I'm trying to print out a field value from a dock module. The Twitch Stream Information dock has a title field, which sets the stream title on twitch. I want to use that field value to create a twitter post. The only thing I'm missing is, how do I extract that value. My code is written in python.
  18. C

    Customize Python Path on Linux

    On Windows there is a "Python Settings" tab that allows me to set my Python path to a virtual environment for OBS. This allows me to manage dependencies easily. However, on Ubuntu, it seems that OBS uses the system python without giving the user to switch to an alternate Python environment. Is...
  19. I

    How to add Media Source Local File with PYTHON

    I have a path such as 'D:\Cycling - My Mountain Route.mp4' how can I assign this path to OBS Media Source with websockets using PYTHON code ? I tried this : sourceName = 'Media Source' Local_file = 'D:\Cycling - My Mountain Route.mp4'...
  20. R

    Python, Hiding Rust Map

    Hi folks, I've been working on this for the better part of a week but simply cannot find an elegant solution. Ideally, AutoHotKey would solve my problems, or there's a "fancy" Python script available on the internets that would also suit my needs. But I'm a Mac guy, and AutoHotKey is not...
Top