YouTube Live Stats (OBS Lua)
Fetches YouTube stats and updates 3 Text sources (GDI+ / FreeType 2).

Quick Start

  1. Open Tools → Scripts in OBS and add Youtube Live Stats.lua.
  2. Create or type in three Text source names for Likes, Views, and Viewers.
  3. Enter your YouTube Video ID and API Key.
  4. Click 🔄 Refresh and create sources then 🎨 Apply Formatting.
Quick Start screenshot placeholder
OBS → Tools → Scripts and load Youtube Live Stats.lua

Tip Learn how to get a free YouTube API key at obscountdown.com.

Install

OBS Steps (All platforms)

  1. Open Tools → Scripts in OBS Studio.
  2. Click the + Add button and select Youtube Live Stats.lua.
  3. The script will appear in the list; select it to configure.

Recommended Store the Lua file in a dedicated folder so it doesn’t get lost when cleaning project files:

Preferred location (create obs-scripts)

  • Windows: %AppData%\obs-studio\obs-scripts\
  • macOS: ~/Library/Application Support/obs-studio/obs-scripts/
  • Linux: ~/.config/obs-studio/obs-scripts/

Example layout

obs-studio/
└─ obs-scripts/
   └─ Youtube Live Stats.lua

Configure

Field Description
YouTube Video ID ID of the live video whose stats you want.
YouTube API Key Your YouTube Data API v3 key.
Polling interval (s) How often to refresh stats (min 5s).
Likes / Views / Viewers Source OBS Text sources to receive values.
Font / Color Optional: set consistent visual style for all three sources.
Configure screenshot placeholder
Script properties with sources, API key, and formatting.

How It Works

The script queries the YouTube Data API for statistics and liveStreamingDetails. It updates three text sources with Likes, Views, and concurrent live Viewers. If a source is missing, the script can create it automatically and add it to your active scene.

Troubleshooting

FAQ

Q. Does it run on all platforms?
A. Yes Windows, macOS, and Linux.

Q. Can I change fonts/colors later?
A. Yes adjust the font and color picker and click 🎨 Apply Formatting.

Q. Where do I get the API key?
A. See the tutorial on obscountdown.com.