Skip to content

This script integrates with OBS to display number of viewers on YouTube and Twitch, as well as the number of YouTube subscribers and Twitch followers. It's designed to provide live statistics for streamers using these platforms.

License

Notifications You must be signed in to change notification settings

sokolov-teach/OBS-viewer-subscriber-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBS viewer/subscriber counter from Youtube/Twitch

Interface of OBS-channel-stats

Overview

This OBS script displays live viewer counts on YouTube and Twitch, as well as the total number of YouTube subscribers and Twitch followers. It was originally developed for a client but has been expanded and improved for broader use.

Note: The YouTube subscriber count may not be exact for channels with over 1,000 subscribers, as the count is rounded due to limitations in Google's API. (because Google takes your data, but doesn't want to provide it back)

Features

  • Live viewer count from YouTube and Twitch.
  • Subscriber count from YouTube and follower count from Twitch.
  • Separate or combined text sources for YouTube and Twitch statistics.

Limitations

  • Due to YouTube API rate limits, care should be taken with the frequency of API calls. Google provides 10,000 points daily. A search call costs 100 points, and regular updates for viewers and subscribers consume 2 points per minute.

Installation

Prerequisites

  • OBS 30 installed.
  • Python 3.10.6 installed and added to PATH.
  • Active accounts on YouTube/Twitch.

Setup Guide

YouTube

  1. Channel ID: Your YouTube channel ID is required (not the channel name). Find it at YouTube Account Advanced or for any channel using Comment Picker.
  2. API Key: Follow this tutorial by WebbyFan: YouTube API Key Tutorial.

Twitch

  1. Channel Name: This is your Twitch channel name as it appears in your Twitch channel URL.
  2. API Key and Secret: Follow this tutorial by CaptZorro: Twitch API Key Tutorial.

Script Configuration

  1. Create text sources in OBS for YouTube and Twitch viewers and subscribers.
  2. In OBS, go to Tools > Scripts and add the script.
  3. Configure the script settings with your API keys, channel IDs, and text sources.

Important: After adding or modifying text sources in OBS, you need to reload the script for the changes to be reflected in the dropdown lists within the script settings. This can be done by right-clicking the script in the Scripts window and selecting Reload.

  1. Start your stream on Youtube and Twitch.
  2. Click the START button to begin fetching data.

Usage

  • The script updates viewer and subscriber counts every 60 seconds.
  • Press the START button after you started streaming to initialize data fetching.
  • Logs are stored in the same directory as the script for troubleshooting.

Platform Compatibility

  • Windows: Works on my machine.
  • macOS: I helped a client run this script successfully on an Apple M1 laptop, but this was tedious because it is hard to make OBS find the right version of Python on Mac. I don't have a Mac machine, so I can't really help with this. Also, I've added logs since this time, so I don't know how Apple handles the creation of text files in their system by OBS scripts.

Contributing

Your suggestions and contributions are welcome! Please feel free to leave feature requests or issues on GitHub, and I'll try to implement them.

Limitations and Points to Note

  • Pressing the START button consumes 100 API points each time due to a search call to the YouTube API. It's advisable to use this button sparingly (ideally only once at the start of each stream).
  • Running the script continuously for 24 hours will consume approximately 2,880 points, well within the daily limit provided by Google, assuming the START button is not overused.

Acknowledgements

Contact

For support or inquiries, please open an issue on GitHub or contact me at sokolov.teach@gmail.com

About

This script integrates with OBS to display number of viewers on YouTube and Twitch, as well as the number of YouTube subscribers and Twitch followers. It's designed to provide live statistics for streamers using these platforms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages