Dynamic Discord video call mapping for OBS
Ever tried laying out your calls nicely for your stream, cropping each participant, adding fancy frames and overlays, and suddenly someone’s video or connection drops, and nothing matches in OBS anymore? This script solves that.
We have to satisfy OBS’s Python requirements. This script was tested on Windows 10 and OBS 26, with WinPython x64 3.6.8.
In OBS’s main menu, go to Tools > Scripts and in the Python Settings tab, browse to the folder where the python
program is located.
This script only requires the discord.py package and its dependencies, and it’s prepared to run without any modifications as part of a virtual environment:
- Clone or download this repository.
- In a command line, run
path/to/python -m venv path/to/repo
, replacingpath/to/python
(pointing to the program itself) andpath/to/repo
accordingly. - Run
path\to\repo\Scripts\activate
(Windows) orsource path/to/repo/bin/activate
(everywhere else). - Run
pip install discord.py
.
- Go to the Discord Developer Portal and create an application.
- Go to the application’s Bot section, and create a bot for it.
- Copy its token into a file named
.bot_token
, sitting alongsidediscrop.py
. - Under Privileged Gateway Intents, enable the Server Members Intent.
After loading discrop.py
in OBS’s Scripts window, you should see a Help text and icon. Hover over it to get extensive instructions on how to use the script.