This application provides real-time alerts for OBS through a simple web interface. It uses Flask and WebSockets to achieve real-time capabilities.
- Receive a GET request to trigger alerts.
- Show alerts on the OBS with user-defined parameters (e.g., image size, text font, size, color).
- WebSockets for real-time updates.
- Python 3.9+
- Docker (for containerized deployment)
-
Clone the repository:
git clone <repository-url> cd <repository-dir>
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python app.py
The application will be available at http://localhost:5002
.
-
Update
Dockerfile
and add anAPI_KEY
-
Build the Docker image:
docker build -t flask-obs-app .
-
Run the Docker container:
docker run -p 5002:5002 flask-obs-app
The application will be available at http://localhost:5002
.
- To trigger an alert, send a GET request to the
/trigger
endpoint with the desired parameters. For example:http://localhost:5002/trigger?api_key=<API_KEY>&gif=<gif-url>&audio=<audio-url>&text=Hello&text_color=red&text_font_size=20px&image_width=50%
Available parameters:
&api_key='YOUR_API_KEY'
&gif_url='https://media0.giphy.com/media/vKHKDIdvxvN7vTAEOM/giphy.gif'
&audio_url='https://www.myinstants.com/en/instant/wow-mlg/?utm_source=copy&utm_medium=share'
&text='SAMPLE TEXT'
&width='40%'
&fontFamily='Arial'
&fontSize='30px'
&borderColor='black'
&borderWidth='1px'
&color='white'
&duration=10000
- OBS will display the alert based on the parameters provided in the request.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.