Tuna

Tuna v1.9.9

univrsal

Active Member
universallp submitted a new resource:

Tuna - Get music information from right within obs

Let's you display information about the currently playing song in obs without running a third-party app.
Currently supports three different ways of music sources:
  • Spotify (All song information, including Cover art)
  • MPD (All song information)
  • Window title (additional formatting, like cutting characters)
To use the Spotify source follow these steps:
  1. Click on "Tools"...

Read more about this resource...
 

valentinbraem

New Member
Really great work!
I put myself in window title mode and no problem with Foobar2000, I just replaced the name of the software "[foobar2000]" with nothing and it is no longer displayed.
It can really be used with any music player or browser, it is complete and excellent for everyone.

Sure, I'll share it in a tutorial in French for my YouTube community.
 

univrsal

Active Member
Really great work!
I put myself in window title mode and no problem with Foobar2000, I just replaced the name of the software "[foobar2000]" with nothing and it is no longer displayed.
It can really be used with any music player or browser, it is complete and excellent for everyone.

Sure, I'll share it in a tutorial in French for my YouTube community.
thanks, Foobar actually also has an API so I might be able to add support for it if I get around for it
 

Monsteer

Member
Nice work!
I prefer to manage song info with a plugin than with an aditional software like Snip.

For non english users, the txt format of the file created by the plugin can't be read it correctly by OBS (GDI+ and Freetype).
Doesn't show accent marks or the copyright symbol (for example) in song titles that have them.

In song.txt the text is ok, but the format of the file (non UTF-8 or UTF-16?) displays incorrect characters.

Captura001.PNG


A very good feature that Snip has is not to show anything if playback stops.
Would it be possible to include it?
 

univrsal

Active Member
Nice work!
I prefer to manage song info with a plugin than with an aditional software like Snip.

For non english users, the txt format of the file created by the plugin can't be read it correctly by OBS (GDI+ and Freetype).
Doesn't show accent marks or the copyright symbol (for example) in song titles that have them.

In song.txt the text is ok, but the format of the file (non UTF-8 or UTF-16?) displays incorrect characters.

View attachment 47372

A very good feature that Snip has is not to show anything if playback stops.
Would it be possible to include it?
Are you using the spotify source? Because that one already supports the option to display a separate string if no song is playing:
2019-08-27_01-57.png

The window title source doesn't because there's no good way of finding out when a player is paused. I could maybe add an option that checks for a certain string and if it's present the plugin will assume the player is paused.

As for the character problem, I assume you're using windows right? I'll have to see what's causing it tomorrow, because on linux it's working fine.
 

Monsteer

Member
Are you using the spotify source? Because that one already supports the option to display a separate string if no song is playing:
View attachment 47373
The window title source doesn't because there's no good way of finding out when a player is paused. I could maybe add an option that checks for a certain string and if it's present the plugin will assume the player is paused.

As for the character problem, I assume you're using windows right? I'll have to see what's causing it tomorrow, because on linux it's working fine.


Yes, Spotify and Windows.

Sorry, my fault. It would only be for the cover, for hide cover.png file when player is paused.

Thanks for your time!
 

univrsal

Active Member
Yes, Spotify and Windows.

Sorry, my fault. It would only be for the cover, for hide cover.png file when player is paused.

Thanks for your time!
Okay, so I fixed the issue with the missing characters. Just redownload and try the new version.
As for the cover just head into the plugin directory (eg. C:\Program Files\obs-studio\data\obs-plugins\tuna) and replace the placeholder.png with an empty png file. This will work with the new version, which uses the placeholder png whenever spotify is paused.
I'll release the new version shortly
 

nerd

New Member
Wow, what a great plugin!

I made a now playing widget for my OBS in case anyone wants to mess around with it.

Thanks, universallp!
 

Attachments

  • nowPlaying.zip
    2.2 KB · Views: 567

univrsal

Active Member
As I told you a few weeks ago, here is my french tutorial about your plugin.
https://youtu.be/esdKX1kYxpI
Nice, if you have some time on your hand you could also help me out with a french translation (Only if you want and have the time for it).

This would be the template for the language file
INI:
tuna.gui.title="Tuna settings"
tuna.gui.menu="Tuna settings"
# Settings tabs
tuna.gui.tab.basics="Basics"
tuna.gui.tab.spotify="Spotify"
tuna.gui.tab.mpd="MPD"
tuna.gui.tab.window_title="Window Title"
tuna.gui.tab.about="About"

# Misc
tuna.gui.select.song.file="Select destination for song file"
tuna.gui.select.cover.file="Select destination for cover file"
tuna.gui.select.lyrics.file="Select destination for lyrics file"

# Spotify tab
tuna.gui.tab.spotify.info="Grabs the currently playing song directly through the Spotify API. To enable this you have to log into Spotify over the link below. After you grant access, you'll get a login code, which you have to paste into the textbox below.\nKeep in mind that some API interactions, like pausing can only be used by premium users"
tuna.gui.tab.spotify.login="Open login page"
tuna.gui.tab.spotify.authcode="Authentication code"
tuna.gui.tab.spotify.loggedin="Logged in"
tuna.gui.tab.spotify.loggedout="Not logged in"
tuna.gui.tab.spotify.token="Token"
tuna.gui.tab.spotify.refreshtoken="Refresh token"
tuna.gui.tab.spotify.requesttoken="Request token"
tuna.gui.tab.spotify.performrefresh="Perform refresh"
tuna.gui.tab.spotify.linkmessage="This will open a browser window with the official Spotify webpage for you to login and grant access. Make sure to check that the URL is correct before logging in!"
tuna.gui.tab.spotify.label.log="Response log"
tuna.gui.tab.spotify.enablelog="Enable log"

# Config defaults
tuna.config.song.placeholder="No song playing"
tuna.config.song.format="%a - %t"

# MPD tab
tuna.gui.tab.mpd.local="Local connection"
tuna.gui.tab.mpd.server="MPD server address"

# Window title tab
tuna.gui.tab.windowtitle.title="Search term in title"
tuna.gui.tab.windowtitle.regex="Use regex for search"
tuna.gui.tab.windowtitle.modifiers="Text modifications"
tuna.gui.tab.windowtitle.replace="Replace"
tuna.gui.tab.windowtitle.with="with"
tuna.gui.tab.windowtitle.cut.begin="Cut first n characters"
tuna.gui.tab.windowtitle.cut.end="Cut last n characters"

# Basic tab
tuna.gui.tab.basics.song.info="Song info path"
tuna.gui.tab.basics.song.cover="Song cover path"
tuna.gui.tab.basics.song.cover.enable="Try downloading cover"
tuna.gui.tab.basics.song.lyrics="Song lyrics path"
tuna.gui.tab.basics.song.format="Song format"
tuna.gui.tab.basics.song.placeholder="Song placeholder"
tuna.gui.tab.basics.format.info="Format info:\n %t => Song title\n %m => Song artist\t\t%d => Disc number\n %a => Album title\t\t\t%n => Track number\n %r => Full release date\t\t%p => Song progress\n %y => Release year\t\t%l => Song length\nKeep in mind that some sources do not support all format options"
tuna.gui.tab.basics.source="Song source"
tuna.gui.tab.basics.status.stopped="Tuna is not running"
tuna.gui.tab.basics.status.started="Tuna is running"
tuna.gui.tab.basics.refreshrate="Refresh rate"
tuna.gui.tab.basics.start="Start"
tuna.gui.tab.basics.stop="Stop"
tuna.gui.tab.basics.notrunning="Preview: Plugin is not running"
tuna.gui.tab.basics.preview="Preview: "

Also my French is pretty rusty, but from what I've gathered you mentioned that the replace function still doesn't work for special characters, so I'll try to look into that.
 
Last edited:

valentinbraem

New Member
Ohhhhh, with pleasure!
I'm already in charge of the French translation of StreamElements, why not do it for you :)

That's right, you have understood. When I want to replace "- Youtube" with nothing, the dash breaks the functioning of the replacement.
That why I use "delete x last characters".

I have a request in the comments of my tutorial, it would be possible to make a line break? in order to have for example in the text file, one line for the artist and another for the title.
 

univrsal

Active Member
Ohhhhh, with pleasure!
I'm already in charge of the French translation of StreamElements, why not do it for you :)

That's right, you have understood. When I want to replace "- Youtube" with nothing, the dash breaks the functioning of the replacement.
That why I use "delete x last characters".

I have a request in the comments of my tutorial, it would be possible to make a line break? in order to have for example in the text file, one line for the artist and another for the title.
Line breaks should be possible, I'll look into it. I was also thinking about allowing output to multiple text files, because that would allow for something like this
mpv-shot0001.jpg

(The visualizer is a separate plugin, which I'm working on)
 

valentinbraem

New Member
I think multiple text files is a better solution than line breaks, but why not propose this two solutions.
WAIT... AN OBS PLUGIN FOR HAVE A MUSIC VISUALIZER? If you do that, it's gonna be awesome!
 

univrsal

Active Member
So I have added the multiple output feature, line breaks and an option to assume playback is paused if a certain string isn't found in the window title. I'll make a release shortly.
WAIT... AN OBS PLUGIN FOR HAVE A MUSIC VISUALIZER? If you do that, it's gonna be awesome!
Yeah I actually started working on it a while back, but wasn't satisfied with how it looked and since I don't know much about audio processing it took me a bit to fix the issue. I'll still have to get it to work with internal obs audio sources and then it's ready for release
 

univrsal

Active Member
universallp updated Tuna with a new update entry:

v1.3

Added option to output to multiple files
Added upper case format option
Added line break format option
Added option to assume playback is paused, if a certain string isn't found in the Window title,
e.g. when looking for Firefox, Tuna will assume playback is paused if "YouTube" isn't also found in the Title, preventing Tuna from displaying information that shouldn't be...

Read the rest of this update entry...
 
Top