Supported Bit Versions
  1. 32-bit
  2. 64-bit
Source Code URL
https://git.vrsal.xyz/alex/tuna
Minimum OBS Studio Version
28.0.0
Supported Platforms
  1. Windows
  2. Linux
Tuna
MDMjS8Y.png
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.

How does this work?
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 extract the binaries from the debian installer and move them into the correct folders themselves.

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. 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.

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.
  • 2019-08-11_23-32.png
    2019-08-11_23-32.png
    926.8 KB · Views: 22,547
  • Screenshot_20200219_022639.jpg
    Screenshot_20200219_022639.jpg
    252.5 KB · Views: 36,050
  • Screenshot_20201013_230446.jpg
    Screenshot_20201013_230446.jpg
    249.8 KB · Views: 138,365
  • Screenshot_20220827_120915.png
    Screenshot_20220827_120915.png
    74.8 KB · Views: 3,397
Author
universallp
Downloads
150,891
Views
314,188
First release
Last update
Rating
4.59 star(s) 37 ratings

More resources from universallp

Latest updates

  1. MPRIS, Windows Media Control and Youtube music

    Added support for MPRIS, Windows Media Control and fixed an issue with Youtube music. MPRIS and...
  2. Fixed crash

    Fixed a crash that would happen when trying to download covers from itunes. Also added some more...
  3. Fixed crash on exit

    Last update introduced a crash which should now (hopefully) be fixed.

Latest reviews

excellent plugin universallp keep it up
Configuration options are nice, but the plugin frequently stops displaying Spotify info despite showing that the plugin is connected and running. Album art is also inconsistently sized when using Spotify. I originally thought these issues were due to a conflicting connection caused by using Elgato Streamdeck Spotify controls, but avoiding the use of these controls has not resolved the issue.
The plugin is really more practical than what already exists and mixed with the Spectralizer plugin the visual experience is really satisfying. Unfortunately, when no sound is played, a square that is not very graphic appears. Would it be possible to hide it or choose a custom image?
universallp
universallp
If you're talking about the question mark image, see "How do I change the placeholder cover?" on the plugin page
Any plans on including Deezer in the supported apps?
universallp
universallp
Maybe once deezer has an API that allows for it. Otherwise you can already use it via the web player.
Best plugin for "now playing"
Widely configurable and easy to use.
it's really good but for some reason it won't show the cover art when playing from SoundCloud. otherwise it's a 10/10
( TUNA Feature Request) Music information from a txt

Hello, after some time looking for a resource I came to your script, and it is very good, really promising, but I use the streamlabs chat bot to make my music requests and it saves a txt file with the title of the song that is playing , what I would need is for your script to capture the title of the song and display the cover art , and just that, is there a possibility to add this feature? I am grateful in advance for taking the time to read this request.
Upon following your two video tutorials, plus reading the top resulted comment that fixes this, the song title still refuses to appear as anything more than "%t" when using a VLC Media Source.. Cover art appears perfectly fine, anything else is a no-go.
universallp
universallp
The latest version uses different formatting, the title would be {title} instead of %t
Exactly what I needed!
I love it, really clever and easy to use!
Top