Supported Bit Versions
  1. 32-bit
  2. 64-bit
Source Code URL
https://git.vrsal.cc/alex/tuna
Minimum OBS Studio Version
28.0.0
Supported Platforms
  1. Windows
  2. Linux
preview.png

Tuna
Lets you display information about the currently playing song in obs without running a separate program.
Currently supports these music sources:
  • Spotify (All song information (except for song label), including Cover art)
  • MPD (All song information*, including Cover art)
  • VLC Video source (All song information*, including Cover art)
  • last.fm scrobbling Cover art, some song information)
  • MPRIS and Windows Media control, i.e. most media players (Cover art, some song information)
  • YouTube Music Desktop App (Cover art, some song information)
  • Window title/process name (additional formatting, like cutting characters)
  • Soundcloud, Yandex Music and Spotify Web Player via the tampermonkey script
*as long as the files are tagged correctly, check with mp3tag.de or kid3.kde.org. Will also extract lyrics if a tag with the same name exists.

How do I set this up?
To ensure that you get the most out of this plugin and get it set up correctly it's encouraged that you read through the following instructions thoroughly.

A basic part of this plugin is the ability of OBS to load both image and text files from disk. If you do not know how that works it is strongly recommended that you familiarize yourself with both the image and text source first:

The first step is to install the plugin for which you'll have to follow the installation steps for your platform:
Windows
Either run the installer or follow these steps:
  1. Open your obs-studio installation folder (eg. Right click on the shortcut and click "Open file location")
  2. Navigate two directories up
  3. Drop the contents of the zip file (a "data" and "obs-plugins" folder) into the obs-studio directory
  4. Merge the files
  5. Tuna should now show up in the tools menu of obs-studio
Linux
If you use a Debian based distro you can use the installer, all other distros currently have to either build the plugin from source or manually extract the binaries from the debian installer and move them into the correct folders, the latter approach might not work on all distros. If you use the flatpak version of obs I can't help you as I have no experience with it. There have been reports that the plugin does not load with the flatpak version.

After you've installed the plugin you should see a new option in the Tools menu:
Screenshot_20220827_121710.png
If it does not show up it means that either the plugin wasn't installed correctly or that OBS couldn't load it. In that case an obs studio log is necessary to help fix the issue.
After you click on the menu this dialog will open:
Screenshot_20220827_121035.png

  1. This is the path to which Tuna saves the cover of the currently playing song. You can leave the default or change it via the "..."-button to a different path if you want. Just remember it later when you add an image source for the cover.
  2. If you uncheck this checkbox Tuna will not download the cover of the currently playing song
  3. If you check this option Tuna will attempt to look for covers by querying Apple's iTunes servers. This will use the album and artist of the currently playing song to search for matching album art. This means that the art that is found might not be exact. You can also choose the resolution that should be downloaded.
  4. If this option is enabled Tuna will remove file extensions from song titles (e.g. .mp3, .wav, .flac etc.). This is useful if you play music through the VLC Source and the songs do not have any metadata saved. In that case VLC will use the entire filename as the title, including the file extension.
  5. With these buttons you can add, remove and edit format outputs. They'll be described shortly.
  6. Enable this option if you want to use the user script which allows Tuna to receive song information from your web browser or if you want to use the browser widget.
  7. All output text files will contain this text if nothing is playing
  8. Here you can switch between the different supported music sources. Tuna will use the selected one to look for the currently playing song.
  9. This is the rate at which Tuna will refresh song information
  10. With these buttons you can start and stop Tuna. If the plugin is stopped it will not look for song information and it will not update the outputs.

What are song outputs?
Since the information is displayed through text sources, which read text from files on your computer you have to configure Tuna to tell it to create these text files and what should be in them. In the main dialog under the "Basics" Tab you can add, edit and remove outputs:
Screenshot_20220827_123844.png

Adding or editing outputs will show this dialog:
Screenshot_20220827_124030.png

The first option defines where the information is going to be saved. Click the "..."-button to select a file path. After that you have to define what information the text file is going to contain. The dialog gives you all options that are supported by Tuna, but keep in mind that not every music source provides all information.

If you want to display the artist and the song title you would enter "{artists} - {title}" into the textbox at the bottom without the quotes. {artists} and {title} will be replaced by the artists and the title of the currently playing song. So the text file would for example contain "Rick Astley - Never Gonna Give You Up". If a song features multiple artists it will list all of them separated by commas (provided that the music source provides all artists). If you only want the first artist to show up you would use {first_artist}. If you use a formatting option that isn't supported by the currently selected music source the plugin will notify you.

The plugin also has the option to capitalize all letters. If you use {TITLE} instead of {title} the file would contain "Rick Astley - NEVER GONNA GIVE YOU UP". You can also limit formatting options to a certain amount of characters. {TITLE:10} would make sure that the song title will be cut off after ten characters so the file would contain "Rick Astley - NEVER GONN...".

If the "Chat log mode" option is enabled Tuna will append the currently playing song at the end of the file so if you are currently paying "Never Gonna Give You Up" and then switched to "Whenever You Need Somebody" the file would contain:
Rick Astley - Never Gonna Give You Up
Rick Astley - Whenever You Need Somebody

When you've set up the output click "OK" to save it. Then click "Apply" in the main dialog to apply the changes.

How do I display the information?
After you've setup the cover path and the song outputs it's time to setup the music source. Here you can find tutorials for the supported sources:
If the information refreshes slowly, you'll have to use your own API Credentials:
To use the Spotify source follow these steps:
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "Spotify" as the music source
  4. Select the "Spotify" tab
  5. Click "Open login page" and accept the info message (might also wanna read it)
  6. Verify the URL, login and grant access
  7. Copy the code into the "Authentication code" field
  8. Click "Request token"
  9. That should be it, if there were errors they will be logged in the textbox under "Response log"
If you experience issues at some point, you can click "Perform refresh" to request a new token, or completely login again by clicking "Open login page" again.
If you continuously experience login issues, make sure that
  1. You have the latest version
  2. The Spotify servers aren't down or the API isn't rate limited (you can check by looking at the obs studio log)
  3. You cleared your cookies for the login page univrsal.github.io (using incognito mode also works)
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "MPD" as the music source
  4. Select the "MPD" tab
  5. Enter the MPD server IP and port (or select local connection)
Only works with VLC >=3.0.0
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "VLC" as the music source
  4. Select the "VLC" tab
  5. (Click refresh if your source doesn't show up)
  6. Select the scene from the drop-down menu
  7. Select the VLC source from the drop-down menu
  8. Click add
This currently doesn't work if your VLC source is in a group or otherwise nested. The hotkeys for switching can be configured in the hotkeys tab in the settings dialog of obs.
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "Web browser" as the music source
  4. Make sure that "Host/receive infromation on local webserver with port:" is checked
  5. Enable the tuna plugin in the youtube music application
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "MPRIS" or "Windows Media Control" as the music source
MPRIS only works with supported players (Web browsers, VLC, Cantata or similar). The same goes for Windows Media Control, if you can see the information in the lock screen it should work.
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "Window title" as the music source
  4. Select the "Window title" tab
  5. Enter any search term (e.g. Firefox, to search for any window that contains the word Firefox)
  6. Optionally add a search and replace term and/or cut the first or last characters
  1. Click on "Tools" at the top of the obs window
  2. Select "Tuna settings"
  3. Select "last.fm" as the music source
  4. Select the "last.fm" tab
  5. Enter your last.fm user name and if you have it your own api key
Basically just enter the server url and make sure that the server provides information via a status-json.xsl.

Now that you've setup the correct output and selected it in the basics tab you can add an image source for the cover:
Screenshot_20220827_130744.png

and as many text sources as you have configured song outputs:
Screenshot_20220827_130915.png

You can also drag and drop text and image files into obs studio to automatically create the sources.

How do I change the placeholder cover?
The placeholder image is saved under C:\Program Files\obs-studio\data\obs-plugins\tuna\placeholder.png or ~/.config/obs-studio/plugins/tuna/data/placeholder.png. It can be replaced with a transparent png if you don't want anything to show when nothing is playing.

How do I keep the cover art consistently sized?
Modify the bounding box type to "Scale to inner bounds". Other scaling types might also work for you, but the default of "No bounds" means that the image source will change its size to whatever image is currently loaded. Additionally you might wan to change the positional alignment to "Center". To change the type select the cover image source, press Ctrl+E and then change the dropdown:
Screenshot-20230502-012023.png

Additional features
YGFyjcu.png
Open or close the dock by selecting View > Docks > Music control. You can also close the dock via the 'x' button when it's undocked or the UI is unlocked. Rightclick anywhere in the dock window to set what information you want displayed.

There's also a lyrics (lyrics.htmi) overlay which will display synchronized lyrics via Musixmatch. The music source has to provide the current progress (Spotify, VLC, MPD or Web Browser) of the song for this to work.
  • 2019-08-11_23-32.png
    2019-08-11_23-32.png
    926.8 KB · Views: 36,496
  • Screenshot_20200219_022639.jpg
    Screenshot_20200219_022639.jpg
    252.5 KB · Views: 45,646
  • Screenshot_20201013_230446.jpg
    Screenshot_20201013_230446.jpg
    249.8 KB · Views: 148,666
  • Screenshot_20220827_120915.png
    Screenshot_20220827_120915.png
    74.8 KB · Views: 17,682
Author
univrsal
Downloads
261,542
Views
536,187
First release
Last update
Rating
4.23 star(s) 60 ratings

More resources from univrsal

Latest updates

  1. Fix Spotify credentials

    Logging in via Spotify with no API credentials should work again.
  2. Fix last.fm crash and nested VLC sources

    Nested VLC sources should now work correctly Note: This version has a bug with Spotify. You...
  3. Increase dialog size and add extra label to spotify ui

    The new theme has too more padding which made it look like the UI was missing the song output...

Latest reviews

Plugin works as expected. I use it on Ubuntu. To make it to work, I had to install it from cmd. I use it with vlc, but it does not work with an instance of vlc running on pc, it works only with vlc source on obs. And I had to install vlc from cmd also because the version from ubuntu app center does not work (vlc source does not appear in obs).
So, after some trouble I find a way to make it works. Maybe some more detailed instructions can help.
It is normal or I missed something?
I noticed a bug with the Windows Installer version (as anonymous1342 stated), and submitted the issue on github. If you're reading this: do Not download the installer - download the zip version, and extract it into your obs folder, until the bug is fixed in the installer.
Apple Music for Windows support would be nice. It works using WMC but will not display artist or album names even though it doesn't say they aren't supported. Also if there's no artwork for a song, it just keeps the previous song's artwork (and sometimes it doesn't change even if there is artwork).
After countless attempts of installing and reinstalling and following several guides, I'll have to rate it 1 star because no matter what I try, it just won't show up in the "Tools" menu.
I don't want to leave a 2 star because this program seems to be everything I'm looking for, The problem is I'm having issues with getting it set up. I've tried following the tutorials but it seems no matter what I try, my music player (using Windows but will be moving the Linux soon) is just not being recognized by Tuna. If I could get some further assistance with this it would be greatly appreciated!
univrsal
univrsal
What player are you using?
I'm sorry to leave such a negative review but I feel like I'm going crazy - I have the exact version of YTMD that's linked in the notes, I've checked the box for the Tuna plugin and restarted, Tuna is running in OBS... but I cannot figure out what I'm expected to do next to actually make it work and anything I try seems to throw an error. Since there is zero documentation anywhere, I'm at a loss as to how I'm supposed to make it function... I'm sure this works great if it could be explained anywhere how to actually set it up or use it!
univrsal
univrsal
Did you follow these steps? ("Setting up the different music sources and displaying their information in OBS" > "Youtube Music")
1.Click on "Tools" at the top of the obs window
2.Select "Tuna settings"
3.Select "Web browser" as the music source
4.Make sure that "Host/receive infromation on local webserver with port:" is checked
5.Enable the tuna plugin in the youtube music application
It works excellent! Thank you so much to developer. Im just curious, if there's any way to show the next song's title for example, if i use a vlc player?
I am leaving a 1 star rating because DEV didn't include instructions for spotify text file format. you wasted an hour of my morning assuming we're all IT pros
It is a little confusing to setup but it works really well once you get everything setup. The only thing I wish is it had more data fields it pulled from. I'd like to be able to use Subtitle and Group Description to make the display the way I want it to. Keep up the great work!
This is not working at all...
First off: My source is VLC but it is NOT a video and it is NOT local .mp3 files hat VLC is playing. It is a radiostreaming service!
Opening up VLCs Media Info UI, it is clearly showing both a "Title" and "Now Playing" correctly so the information is obviously there to be rabed by Tuna but within Tunas settings -> VLC - there is absolutely nothing showin up in the "Source" list even tho VLC is running and playing.
Selecting the scene where VLC is actually at, still does not allow me to pick a "Source" because there is nothing there no matter how many times I try refreshing it.

I am using Windows 11 Pro, OBS 29.1.3 and VLC 3.0.19. with a skin since everyone hates glaring white UI eements...
univrsal
univrsal
Is the source inside a group? That usually causes issues.
Top