A simple web overlay that displays the currently playing song from Web Scrobbler (browser extension) or Nightbot (song requests).
- Receives track information from Web Scrobbler browser extension via webhook
- Integrates with Nightbot's song request system via API
- Displays current song information via a web interface (artist, title, album art)
- Designed for streaming overlays with configurable appearance
- Automatically hides when music stops playing
- Works with any browser or OBS browser source
go build
- Run the executable. By default, it will listen on
localhost:5284
- Add
http://localhost:5284
as a browser source in OBS or open in a browser - Configure either Web Scrobbler or Nightbot integration (or both):
- Web Scrobbler:
- Install the Web Scrobbler browser extension
- In Web Scrobbler, go to the "Accounts" section and add a Webhook entry with the API URL value of
http://localhost:5284/webhook
- Play music through any service supported by Web Scrobbler
- Nightbot: Set up the required environment variables (see Nightbot Integration section)
- Web Scrobbler:
The overlay appearance can be customized by adding URL parameters:
origin
: Position of the display (default:bl
)tl
: Top Lefttr
: Top Rightbl
: Bottom Leftbr
: Bottom Rightcc
: Centertc
: Top Centerbc
: Bottom Centercl
: Center Leftcr
: Center Right
size
: Font size in pixels (default:36
)color
: Text color (default:white
)bg
: Background color (default:rgba(0,0,0,0.5)
)dwell
: How long to show full size before minimizing, in seconds (default:3
)mini
: Scale factor when minimized (default:0.6
)
Example: http://localhost:5284?bg=rgba(0,0,0,0.8)&color=red&size=24
MUSICSTATE_PORT
: Port to listen on (default: 5284)MUSICSTATE_LOG_DIR
: Directory to store logs (default: executable directory)
To enable Nightbot integration, set the following environment variables:
NIGHTBOT_CLIENT_ID
: OAuth client ID for Nightbot APINIGHTBOT_CLIENT_SECRET
: OAuth client secret for Nightbot APINIGHTBOT_REDIRECT_URL
: OAuth redirect URLNIGHTBOT_TOKEN
: JSON-formatted OAuth token for Nightbot APINIGHTBOT_POLL_INTERVAL
: Polling interval in seconds (default: 5)
- Create a Nightbot application at https://api.nightbot.tv/oauth2/applications
- Set the redirect URL to a valid URL for your application (or use
http://localhost
for testing) - Get your client ID and client secret from the application details
- Use the OAuth 2.0 flow to obtain an access token with the
song_requests_queue
scope - Save the token response JSON as the value for
NIGHTBOT_TOKEN
When properly configured, MusicState will poll the Nightbot API to get currently playing song request information and display it in the overlay.
This project is licensed under the GPLv3 License - see the LICENSE file for details.