Show the song that's playing in OBS, with no code
Put the current song on your live stream with AudD's hosted now-playing widget as an OBS Browser source: add your stream, get the widget address, pick the look, and fix a widget that shows nothing.
If you stream on YouTube, Kick or anywhere else and use OBS, you can show your viewers the song that’s playing. You can use the AudD real-time music recognition service for audio streams to identify the songs that are being played on your live stream. Our widget shows the last recognized song, and you add it to OBS as a Browser source: no code, no server.
If you’re a Twitch streamer, you can also use our Twitch extension, which is the easier way: see Show recognized music on a Twitch stream.
What viewers will see
The widget will display the last recognized song and its cover art, on top of the video in OBS. It’s based on our Twitch extension’s frontend: viewers see the cover with a “Now Playing” label under it, the title and the artist, and a small AudD logo in the corner. If you want it to show the history, it also shows the songs that played before.
The widget address looks like this, with the category of your stream after ch=-:
https://widget.audd.tech/?ch=-22cd61d45
Here, 22cd61d45 is an example of a stream’s longpoll category. Steps 1 to 3 get you the category of your stream.
What you need
You’ll need OBS Studio, an AudD API token with one stream, and the address of your live stream. As the URL of the audio stream, you can simply send the URL of your live stream. We support most of the stream formats, including DASH, Icecast, HLS, m3u/m3u8. We also natively support Twitch broadcasts and YouTube live streams: you can send youtube-ch:[channel id] for the current live stream on your YouTube channel, like youtube-ch:UC3zwjSYv4k5HKGXCHMpjVRg, or twitch:[channel name], like twitch:monstercat for twitch.tv/monstercat. Your YouTube channel ID is in the advanced settings of your account (select your profile picture, then Settings, then Advanced settings).
For Kick and other sites, send a direct URL of the stream in one of these formats. The address of your channel page won’t work.
Step 1: Get a token and a stream
You can get a token from our API Dashboard. Set the limit of audio streams to 1 and pay on the API Dashboard: stream monitoring is $45 per stream per month. New accounts that get the free trial may also get a 3-day trial of one stream. The test token doesn’t work for streams; use your own token.
Step 2: Add your stream
You don’t need to send any API requests: our web interface allows adding, removing, and updating streams.
- Open audd.io/streams, enter your API token and click Submit.
- Under Callback URL, enter
https://audd.tech/empty/and click Update Callback URL. If the field already has an address, leave it as it is. - Under Add Stream, enter the address of your stream and
1as the Radio ID. As the Callback Type, choose Before (when song starts). Click Add Stream. - Your stream appears under Current Streams. Click Open Widget to see the widget in a new window.
Callbacks are the requests with recognition results our servers will send to a server. You don’t have one, but the widget still needs a callback URL on your account: https://audd.tech/empty/ always responds with 200 OK and discards them. Please set it before you add the stream.
With Before (when song starts), we send the results as soon as a song starts playing. By default, we would send them after songs end playing, so the widget would show each song once it’s over.
Step 3: Get the widget address
Use the longpoll category with ”-” before it as the ch URL parameter. As the category, use the longpoll_category field from the getStreams response: open this address in your browser, with your API token in it.
https://api.audd.io/getStreams/?api_token=your-api-token
The browser shows all the streams you sent us. Find "radio_id": 1, and copy the longpoll_category next to it:
{"status":"success","result":[{"radio_id":1,"url":"youtube-ch:UC3zwjSYv4k5HKGXCHMpjVRg","stream_running":true,"longpoll_category":"22cd61d45"}]}
With this category, the widget address is https://widget.audd.tech/?ch=-22cd61d45.
Note. Please don’t do this while you’re live: the address has your API token in it. You can share the category with your viewers, but please don’t include your API token in anything they can see.
If you use the AudD CLI, it can do Steps 2 and 3 in a terminal: audd login, then audd streams callback set https://audd.tech/empty/ and audd streams add youtube-ch:UC3zwjSYv4k5HKGXCHMpjVRg --id 1 --start. audd streams list --format json prints the longpoll_category.
Step 4: Add the widget to OBS
- Select the Scene you wish to add the widget to from the Scenes list.
- In the Sources list, right click (or click the + button) to add a new source and select Browser. Give it a name, like Now Playing.
- In the properties for your new Browser source, paste the widget address in the URL field.
- Set Width to
400and Height to150. With thehistoryoption, set Height to300. - Click OK to save your changes.
You can put the widget anywhere you want. Just drag it in the preview, and drag its corners to make it larger or smaller. Please keep it above your game and your camera in the Sources list: otherwise, they’ll hide it.
Leave Custom CSS as it is: by default, it sets the background to be transparent, so your game and your camera show through around the widget.
Styling options
You can also use the URL parameters to get the look you want. Add them to the end of the widget address, each one after &.
With black-font, the text is black instead of white, which is better for light scenes. With history, the widget also shows a list of the songs that played before, under the last one. With background, the widget is on a colored panel, with a faded, grey copy of the cover behind the song, and shadow adds a shadow under the cover.
For example, https://widget.audd.tech/?ch=-22cd61d45&black-font, or with all three of the others, https://widget.audd.tech/?ch=-22cd61d45&background&history&shadow. After you change the address in OBS, click Refresh cache of current page in the source properties if the widget doesn’t change.
When nothing shows
Before the first song
If we haven’t recognized any songs on your stream yet, the widget has nothing to show. You’ll see the first song seconds or minutes after you add the stream, while music is playing on it.
An old song when you go live
The widget shows the last recognized song, even if it’s from your previous stream. It changes as soon as we recognize the first song of the new one.
The address
The ch parameter is the category with ”-” before it: ch=-22cd61d45, not ch=22cd61d45.
The callback URL
If the account has no callback URL, the widget gets no songs. Set https://audd.tech/empty/ as in Step 2.
The songs show up late
By default, we will send new results after songs end playing. If that’s what you see, delete the stream in the web interface and add it again with Before (when song starts). Use the same Radio ID: the category is calculated from your API token and the Radio ID, so the widget address won’t change.
The stream has a problem
If something happens to an audio stream, we send a notification to the callback URL, but https://audd.tech/empty/ discards it. Instead, look at the stream’s Status in the web interface (click Refresh Streams): if it’s not Running, check the address of your stream, and click Update URL to change it. See Stream health for more.
A design of your own
If you want your own design, you’ll need a server that receives the callbacks. In Build a now-playing widget for a livestream, you’ll find the server and an HTML widget that you can change.
Related
Reading this as an AI agent? The raw Markdown is at recipes/obs-now-playing-overlay.md, and the full index is /resources/llms.txt.
