norihiro / obs-text-pthread

Rich text source plugin for OBS Studio
GNU General Public License v2.0
36 stars 4 forks source link
obs-studio obs-studio-plugin

OBS Pthread Text

Introduction

This plugin displays text with many advanced features.

Markups

See the Pango Markup Language for detailed markup tags available.

Properties

List of properties describes all available propeties.

Updating text

This plugin can set the text by setting or from a text file. To have transition, it is recommended that the text is updated from a progam, not by typing on the propeties window.

Updating text using obs-websocket

You can use SetSourceSettings request for obs-websocket. Request fields will be as below for example.

{"sourceName": "source-name", "sourceSettings": {"text": "your new text"}}

Updating text file

This plugin checks these file attributes; inode, mtime, and size. Recommended flow to update the text is as below.

  1. Set the source file in the property of this plugin. Let's say /dev/shm/text.txt for example.
  2. Write to a temporary file. your_program > /dev/shm/text.txt~
  3. Move the temporary file to the target file. mv /dev/shm/text.txt~ /dev/shm/text.txt This step is atomic so that the plugin won't read the middle state.

Furture plan