OBS script that updates the YouTube livechat URL on a browser source on stream start to the livechat associated with the (first) current livestream on a given channel. If no livestream is active, a placeholder page saying "No Stream." will be injected. You can style the text via the css class .nostream
to match your background etc.
You will need a YouTube API key, see https://developers.google.com/youtube/v3/getting-started and https://developers.google.com/youtube/registering_an_application for more information on how to go about that.
Additionally you will require the channel ID of the channel for which you want to query the current live stream. You can retrieve that by inspecting the web site source of the channel in question and looking for externalId
.
To use, download youtube-live-chat-update.py
and add it as script to OBS Studio. Note: Be sure to configure a valid Python environment first, see here for more details.