keifufu / WebNowPlaying-OBS

OBS Adapter for WebNowPlaying
MIT License
19 stars 1 forks source link

DesktopApps Support #1

Closed Solomag closed 1 year ago

Solomag commented 1 year ago

Hello! I'm really interested in your project because it was challenging for me to find something similar. Most plugins are focused on Spotify, which is not what I was looking for. I wanted to ask if it's possible to implement support for desktop applications, specifically Tidal, Aimp, and MusicBee? Alternatively, is it possible to make the plugin work through Last.fm?

keifufu commented 1 year ago

Even though you said you're not interested in Spotify, I'd like to mention WNPRObs works with Spotify by installing WebNowPlaying-Redux-Spicetify.

As for other desktop apps, I don't think they'll receive support any time soon, if ever. As for last.fm, if you're just talking about their website, I can totally add support for it to the browser extension!

Solomag commented 1 year ago

Thank you for such a quick response. Yes, Last.fm would be a good alternative, but unfortunately, there may be some delays. I suppose the current plugin works almost instantaneously, which is fantastic. I really appreciate the excellent work you've done.

keifufu commented 1 year ago

Not sure what you mean by "there may be some delays", care to elaborate?

Solomag commented 1 year ago

Last.fm receives track information from the scrobbler after some time to take into account the tracks you've actually listened to, rather than just skipped over. Depending on the application, this can take anywhere from 10 to 60+ seconds.

keifufu commented 1 year ago

I'll have to look into last.fm as I know next to nothing about it.

Solomag commented 1 year ago

Last.fm is a music website that allows you to track and discover new music. It keeps a record of the music you listen to and provides personalized recommendations based on your listening history.

keifufu commented 1 year ago

If it's not a music "player", I'm not sure I can actually use it to display media information in WebNowPlaying

Solomag commented 1 year ago

Scrobbling is the process by which information about the track you're listening to on your device is sent to Last.fm's servers. To enable scrobbling, you need to install the Last.fm scrobbler on your device and log in to your Last.fm account through it.

When you start playing a track, the scrobbler tracks information about it and sends it to Last.fm's servers. Last.fm analyzes this information and adds the track to your library, as well as uses it to provide personalized recommendations.

To ensure scrobbling works correctly, the track must be played for at least 30 seconds and played in full (not skipped or missed). It's also important that the track's name and artist are correct, otherwise the track information may be scrobbled incorrectly.

keifufu commented 1 year ago

So how would you imagine last.fm working with WebNowPlaying? WNP is normally used for real-time status displays and to control the playing media from Rainmeter, etc. by pausing, setting volume, etc.

keifufu commented 1 year ago

Also, for playing local music files, I used to use winamp but since that isn't WebNowPlaying compatible I switched to using Navidrome. It's basically a self-hosted music streaming server, and since it's accessible via a web-ui it works with wnp.

keifufu commented 1 year ago

LMK if this has been resolved for you or if you need anything else, otherwise I'll close this issue (as you reacted with hooray)

Solomag commented 1 year ago

I just think that there is no possibility to connect browser capture with desktop streaming services (except spotify) for obs like this. So its should be just another way to do it. Btw, another question. There few apps wich sending same info about what you listening too to Discord from your desktop streaming services. Could it be used for such capture?

keifufu commented 1 year ago

I think WebNowPlaying will continue to only work for browser-based media, with the exception of Spotify. I'm sorry.

Perhaps in the future I might add basic media detection via Windows APIs as a fallback. If that happens, I'll comment here to let you know if I don't forget :)

keifufu commented 1 year ago

I will actually add support for native apis pretty soon, at least for windows.

Could you tell me if the players you're using show up in the media control panel / the popup you get when changing volume etc.?

If they do, then WNP will be able to read it. If not, some players have plugins to make them work with windows.

keifufu commented 1 year ago

@Solomag tagged you just in case :)

Solomag commented 1 year ago

Hey, thats really cool! Im using Tidal as analog of Spotify, AIMP and MusicBee.

keifufu commented 1 year ago

Not sure what that means! Does it report back to windows?

keifufu commented 1 year ago

@Solomag I just tried it myself now. (Talking about the new method I'm adding of course, so it won't work for you until I update it once all is done)

Tidal works out of the box. Spotify works out of the box. AIMP works with this plugin MusicBee works with this plugin

Edit: The reason the last two work after installing a plugin for windows 10 media overlays is because that's what WNP is reading information from. And yes, it does work with win11.

Solomag commented 1 year ago

Thats amazing! How can I support you? And yep, I was saying about Windows. And when update will be available? Btw, I had those plugins already installed =)

keifufu commented 1 year ago

@Solomag not sure what you mean by supporting me. The update might still take another.. maybe a week? It's part of a much bigger update concerning all WebNowPlaying projects you can see on my profile. I can't risk breaking anything so it'll depend on if I discover any more bugs during testing.

Solomag commented 1 year ago

I meant with money or participating in beta-test.

keifufu commented 1 year ago

@Solomag I haven't thought about public beta testing yet and I'm not sure I'll ever do them as I'd probably only release beta builds when they're in a stable state anyway. As for donations, I do have a paypal if you insist.

keifufu commented 1 year ago

@Solomag Just thought I'd give you an update.

I've ran into quite a lot of issues with making this new change work for the Rainmeter adapter. I'm pretty sure it'd already work with OBS but the Rainmeter adapter is my main priority. Sorry this is taking so long.

Solomag commented 1 year ago

Checked update, not working with Tidal, AIMP, MusicBee. Re-installed script from start, works in browser, not seeing desktop apps. Closing browser just gave N/A-N/A In the same time. Droptop plugin seen my Tidal. Also closed droptop, same problem. All plugins for AIMP/MusicBee been re-instaled.

System Win 11 Pro 22H2

keifufu commented 1 year ago

I wasn't clear enough, sorry. I have stuff working locally, I haven't updated anything yet. I'll only update it once I'm done with all adapters.

Solomag commented 1 year ago

Ok, waiting for it

keifufu commented 1 year ago

Should be all done! Check the latest release ^^

Please let me know if you run into any issues using it, it's almost impossible for me to test all possible scenarios.

Solomag commented 1 year ago

Hello! I decided to check it out. To do this, I deleted the script and then installed a new one. I restarted both OBS and the browser. The capture simply stopped working altogether, both with the browser and with native applications. I'm attaching the log file and a screenshot showing the lack of connection with the browser.

[wnp-obs.py] load
[wnp-obs.py] Traceback (most recent call last):
[wnp-obs.py]   File "C:\Program Files (x86)/Steam/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\wnp-obs.py", line 69, in script_load
[wnp-obs.py]     WNPRedux.start(6534, '2.0.0', logger)
[wnp-obs.py] AttributeError: type object 'WNPRedux' has no attribute 'start'

https://i.imgur.com/ZJ7Vjif.png

keifufu commented 1 year ago

Both the changelog and the README state to update pywnp

Solomag commented 1 year ago

Huh? I didn't get it. Wdym?

keifufu commented 1 year ago

Remember to update pywnp via pip install --upgrade pywnp

Solomag commented 1 year ago

Works amazingly! I've been waiting for a plugin like this for so long! Give me your PayPal, I'll contribute how I can.

keifufu commented 1 year ago

Phew, glad it worked!! DM me on discord: keifufu#0727