YouTube Live Stats (OBS Lua Script)
YouTube Live Stats is an open-source Lua script for OBS Studio that displays real-time YouTube stream statistics such as Likes, Views, and current Viewers directly in your scene through text sources. It is designed for reliability, cross-platform compatibility, and ease of use.
Features
- Displays live YouTube statistics in OBS text sources
- Automatically creates missing sources in the active scene
- Supports both Text (GDI+) and Text (FreeType 2)
- Optional font and color synchronization for all sources
- Works on Windows, macOS, and Linux
- Open source and script-only (no third party apps or websites required)
How to use
- In OBS Studio, open Tools → Scripts.
- Click Add (+) and select Youtube Live Stats.lua.
- Enter your YouTube Video ID and API Key. Learn here how to get a free YouTube API key the free keys provide enough quota for personal use when accessing the YouTube API.
- Assign the three text sources for Likes, Views, and Viewers.
- Use the Refresh and Create Sources button to generate or link them.
- Optionally, use Apply Formatting to apply font and color styling (this should apply automatically after every change but just in case you can force an apply).
It is recommended to store the Lua script in a dedicated folder such as:
Windows: %AppData%\obs-studio\obs-scripts\
macOS: ~/Library/Application Support/obs-studio/obs-scripts/
Linux: ~/.config/obs-studio/obs-scripts/
Project Repository
The full source code and documentation are available on GitHub:
https://github.com/mmlTools/youtube-live-stats
Support the Project
If you find this script useful and wish to support further development or see new scripts:
Ko-fi: https://ko-fi.com/mmltech
PayPal: https://paypal.me/mmltools