Friday roundup: OBS Studio 33.0.0 Beta 1, and this week’s movement around streaming

obsUncategorized
スポンサーリンク
スポンサーリンク

What this article covers

This is a Friday note about OBS Studio and the tools around it. Two subjects: the OBS Studio 33.0.0 Beta 1 build, and OBS WebSocket.

The search phrase I have in mind is “OBS Studio 33.0.0 Beta 1 新機能” — the new features. I want to be straight with you before anything else: I am not going to list those features from memory. The release notes are the source, they are short, and I have linked them at the bottom. Please read them there rather than take a second-hand list from me.

What I can do is explain where a beta build sits, say plainly what OBS WebSocket is, and then spend the rest of this article on something I actually put my hands on: a small Python script that talks to OBS over that WebSocket, and what happened when I ran it.

So, in scope:

  • What a beta build is for, and what it is not for.
  • What OBS WebSocket is, in a paragraph.
  • A short Python script that reads the stream status, switches the current scene, and starts the stream.
  • The result of running it, written as it came out.

Out of scope, and I will not guess at any of it: the beta’s feature list, how the beta compares with earlier versions, performance numbers, and anything about behaviour during a real broadcast. I have not tested those.

Where a beta build sits

A beta build is a pre-release. It is published so that people can try the next version before it becomes the stable release, and so that problems are found while there is still time to fix them. That is the whole point of it. It is not the build you put on the machine you stream from.

If you do want to look at it, my suggestion is to keep it away from your working setup — a second machine, or a copy installed in a way that does not touch your usual one. Then the worst case is that the test copy misbehaves, and your Friday stream still goes out.

I think that is the useful way to read the beta announcement: as an invitation to test, not as a recommendation to move.

What OBS WebSocket is

OBS WebSocket is a small server that runs inside OBS Studio and speaks the WebSocket protocol. Any program that can open a WebSocket connection — a script, a phone app, a control surface — can connect to it, ask OBS to do something, and receive a reply. It can also subscribe to events, so the other program hears about things as they happen rather than asking over and over.

The project was folded into OBS Studio itself, so current builds ship with it. There is nothing separate to install. It listens on a port on the local machine, by default 4455, and you turn it on or off, and set a password if you want one, inside OBS’s own settings. The messages it speaks are written down by the project, and that document is the reference I worked from.

If you take one thing from this section: OBS WebSocket is not a streaming feature. It is a door into OBS, and what happens after you open it is up to the program you write.

What I made: a small script that talks to OBS from Python

The script does three things and nothing else.

  1. Read the current stream status and the list of scenes.
  2. Switch the current scene to a name you give it.
  3. Start the stream.

I kept it that small on purpose. Three jobs are enough to show how the connection works, how a request is sent and answered, and where the parts go if you want to add more. A longer script would have made those shapes harder to see.

Before you run it, you need:

  • Python 3, any recent version.
  • OBS Studio running, with the WebSocket server enabled in its settings.
  • The port number. If you have not changed it, it is the default.
  • The password, if you set one when you enabled the server.
  • Nothing to install.

That last line is the one I want to be careful about. When I planned this article I had assumed I would be pointing you at a Python client library and its distribution page. There is no such step here. The script uses only what comes with Python — socket, json, hashlib, base64, secrets, struct, argparse, time, and unicodedata. No pip install, and no third-party package to credit. If you came here expecting a library walkthrough, this is not that article, and I would rather say so now than have you find out three sections down.

The code

This is the whole script, unchanged. Save it under any name you like; the examples below call it obs_web_socket_demo.py.

コメント

タイトルとURLをコピーしました