ZyphenVisuals / zyphens-now-playing

24 stars 8 forks source link

VLC Source Track Title Overlay Not Updating To Match Track.txt #4

Closed ginoel closed 3 months ago

ginoel commented 1 year ago

I am using Tuna to read from a local file of a VLC source in OBS on a Mac. The Track.txt file is updating correctly (I can verify by opening the txt file), but the Zyphens overlay in OBS browser source local file overlay only updates if I manually click "Refresh cache of current page" in OBS.

I am not a coder. Is there a way to update either the Song.html file or the custom CSS field in OBS so the correct song title automatically updates?

ZyphenVisuals commented 1 year ago

Hi!

The reason for no updating is the name of the file. In the installation tutorial from the OBS forums, I mentioned the following:

In order for this to work, you must set Tuna to export the following files in the same directory as Song.html:
- "Snip_Track.txt" containing the song's name (%T)
- "Snip_Artist.txt" containing the artist's name (%M)
- "Snip_Artwork.jpg" containing the album artwork

I'm sorry for not including this here, perhaps I should be more clear on where to find the installation tutorial.

Regardless, let me know if it works after changing the file name!

ginoel commented 1 year ago

I did try flipping it back to Snip_Track.txt in Tuna settings & OBS but it still won't auto-update. If I use an OBS source Text source & point it to the Snip_Track.txt (or the prior set-up of Track.txt), that auto-updates. But the problem with the OBS Text source is I don't seem to be able to change the text alignment so as the track title name changes in width, the text won't remain centered on screen or left aligned over the Tuna progress bar. If I can't get the OBS browser source to auto-update, I'll just go with the text source. But I'd prefer to get the Browser source to work correctly if possible

ZyphenVisuals commented 1 year ago

So just to have everything checked out:

You have 3 files called Snip_Track.txt, Snip_Artist.txt, Snip_Artwork.jpg, all located in the same folder as Song.html?

If that's the case, could you try just double clicking Song.html (will open it in a browser instead of OBS), and then letting me know if that updates together with the txt files?

ginoel commented 1 year ago

I am only displaying the song title, so I only updated Track file name in the song.html & selected it to match in the Tuna Settings/Song info outputs (that uses {title} not %T). But I just updated all the html to the original file names to match exactly what you listed above for all 3 files (including both places for the artwork) and it had no bearing on the Browser source being able to auto-update. I still need to manually refresh to get the current track to match the txt file (confirming again that the OBS Text source is able to auto-update the track name regardless of the file name for the track being Snip_Track.txt or Track.txt)

ZyphenVisuals commented 1 year ago

Did you check if it updates when you double click Song.html so open it in your browser?

ginoel commented 1 year ago

When I double click on Song.html, it launches in Safari (I can see the path at the top), but the page is blank.

ZyphenVisuals commented 1 year ago

are you playing a song currently? the page being blank is normal if no song is currently being played, as the widget hides itself.

ginoel commented 1 year ago

Great question. I was NOT playing anything. So I started playing a song, but the Safari page remained blank. So I then hit the refresh button on the Browser source in OBS & the correct song title updated, but the Safari page is still blank even if I click refresh on the tab where I have it open in Safari

ZyphenVisuals commented 1 year ago

Okay, so something is going pretty wrong, and I can't test MacOS support myself as I don't own any apple desktop devices.

Maybe the browser implementation in OBS is different in MacOS than Windows, and something in my widget doesn't work with it, different security policies and such. Tomorrow I can test it on a Mac device and I'll update this thread.

Thank you for the report, let me know if you have any updates!

ginoel commented 1 year ago

That's fantastic - I appreciate the help. Thankfully I have the text source workaround. So nothing urgent on my end.

But here are all the specs on what I'm working with: OBS Studio 29.0.2 (Mac) VLC 3.0.18 tuna-1.9.3-macos-arm64.pkg Zyphen's Now Playing overlay 2.1 macOS Ventura Version 13.1 Mac mini Apple M1

Here's more detail from when I first reported the issue on the Tuna page: https://git.vrsal.xyz/alex/tuna/issues/215

PS I wonder if it's possible there's some kind of conflict with the Zyphen's now playing feature and a modification a friend made to my OBS so I can run multiple simultaneous music live streams from the same desktop. I have no idea how my friend got multiple OBS streams on one desktop. But my desktop icons for OBS now look like an application called Automator & the info for this app on my Mac says it's version 2.10. Hope this is helpful

ZyphenVisuals commented 1 year ago

Thanks for the details! I'll ignore the Automator thing as of now, since I really doubt that would affect anything.

Most likely issues are either related to OBS 29 (28 introduced some big changes, and this was developed on 27, which I still use), or a MacOS issue.

I'll check both tomorrow.

ZyphenVisuals commented 1 year ago

Hey, sorry for the delay, I didn't get to use a Mac today. I don't have any so I'm waiting for a colleague to bring one one of these days. Shouldn't take too long, I'll keep this updated.

ZyphenVisuals commented 1 year ago

Tested on an M1 MacBook Air 2020, running MacOS Ventura 13.1, on the newest OBS available from the download page.

After adding a Snip_Track.txt and Snip_Artist.txt, everything appeared, updated and worked accordingly.

The only requirements for my widget to show up are for both these files to exist, and contain text (not be empty).

Is one of the files perhaps empty for you?