It is currently April 23rd, 2024, 12:04 pm

Youtube Video Title In Rainmeter

Get help with creating, editing & fixing problems with skins
User avatar
xtcvv2
Posts: 27
Joined: July 11th, 2012, 3:56 pm

Youtube Video Title In Rainmeter

Post by xtcvv2 »

Anyone know of a way to get the youtube video title from a video that's currently playing in a browser to show in rainmeter like you can with a media player and NowPlaying plugin?
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Youtube Video Title In Rainmeter

Post by balala »

There is a simplay way to get the title, if the Rainmeter knows the URL of the video. You need just a WebParser measure:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=80,80,80,220
AccurateText=1
DynamicWindowSize=1

[Variables]
URL=https://www.youtube.com/watch?v=6jgjk3DsN7c

[MeasureYouTube]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=-1
Url=#URL#
RegExp=(?siU)<title>(.*) - YouTube</title>
DecodeCharacterReference=3
StringIndex=1

[MeterYouTube]
Meter=STRING
MeasureName=MeasureYouTube
X=0
Y=0
Padding=15,5,15,5
FontColor=255,255,255
FontSize=10
StringAlign=LEFT
FontFace=Segoe UI
Antialias=1
Text=Last update: %1
DynamicVariables=1
But I don't know a way to get the URL of the currently played video. Once I wrote a this kind of app in Delphi, but that was an exe file. I think it could be used here as an external app (or addon). I'm not sure this would be the best way, maybe it would be possible to do that in lua? If you want to give it a try, let me know and I'll try to find that app (I wrote it a few years ago, so I need to search it).
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Youtube Video Title In Rainmeter

Post by drakulaboy »

i modded a little bit the RadioNow skin for youtube, and it's opening youtube videos in VLC player :) even http live tv

Image
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Youtube Video Title In Rainmeter

Post by jsmorley »

drakulaboy wrote:i modded a little bit the RadioNow skin for youtube, and it's opening youtube videos in VLC player :) even http live tv
I made a "YouTube / VLC" skin a while back, and it's not too hard. You just get the YouTube RSS Feed, parse it for a search term or just use the latest, and send the http for the video to VLC. I didn't follow through on this though, as what I found was that many videos on YouTube, (really a decent percentage) are "restricted" to what country and / or device they can be viewed on. So you get a lot of failures in viewing in VLC, when they work fine in your browser.
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Youtube Video Title In Rainmeter

Post by drakulaboy »

Your skin is doing great on my experiments :D , made a mp3 online player and downloader, and using only FileView plugin , a filter, and VLC done a offline mp3 player :great:
User avatar
xtcvv2
Posts: 27
Joined: July 11th, 2012, 3:56 pm

Re: Youtube Video Title In Rainmeter

Post by xtcvv2 »

So it seems like there's no easy way to get the title automatically. I'll have to do some googling for plugins to output youtube title to a text file, that way I could easily make a "note" skin to show what's in the text file.

*Edit*

So I got it working with a Chrome Plugin which is meant for streamers using OBS and XSplit.
If anyone is interrested the plugin can be found here >https://github.com/Wykks/Untamed-Now-Playing-Next<
And the code can be taken from here:

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=YouTube Music Title
Author=xtcvv2
Information=Shows Youtube Video Title With The Help Of A Plugin On Chrome
License=
Version=1.0


[Variables]
FilePath="C:\Users\Admin\Documents\OBS Stuff\ChromeYoutubeTitle\"


[BG]
Meter=Image
SolidColor=0,0,0,1
x=0
y=0
w=270
h=50

[mTitle]
Measure=Plugin
Plugin=QuotePlugin
PathName=#FilePAth#unp_now_playing.txt
Separator=¶

[Title]
Meter=String
MeasureName=mTitle
x=135
y=0
w=270
h=50
FontFace=Arial
FontSize=15
FontColor=255,255,255,255
StringEffect=Border
StringAlign=Center
ClipString=2
AntiAlias=1
You're free to do whatever with this. :D
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Youtube Video Title In Rainmeter

Post by balala »

Another way to get the title is using a little app I wrote (as I said before). It'll get the URL of the opened youtube page and will send it with a !SetVariable bang to the skin. Then the skin will use it to get the title. For now, the app works only with Internet Explorer, but it can be easily adapted to work with other browsers, too. If someone will ask for it, I can do that, just let me know what browser would you like to use.
Be carefuly, the skin contains an exe! It's safe, I wrote that app using the Delphi language, but anyway it's an exe file, so use it at your own risk. If somebody need, I can give the source code, just ask for it.
You do not have the required permissions to view the files attached to this post.
thekey
Posts: 56
Joined: July 25th, 2013, 4:13 pm

Re: Youtube Video Title In Rainmeter

Post by thekey »

balala wrote:Another way to get the title is using a little app I wrote (as I said before). It'll get the URL of the opened youtube page and will send it with a !SetVariable bang to the skin. Then the skin will use it to get the title. For now, the app works only with Internet Explorer, but it can be easily adapted to work with other browsers, too. If someone will ask for it, I can do that, just let me know what browser would you like to use.
Be carefuly, the skin contains an exe! It's safe, I wrote that app using the Delphi language, but anyway it's an exe file, so use it at your own risk. If somebody need, I can give the source code, just ask for it.
It would be nice to see something like this for Chrome and Firefox, as I use one for Chromecasting and the other for everyday viewing.
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Youtube Video Title In Rainmeter

Post by balala »

thekey wrote:It would be nice to see something like this for Chrome and Firefox, as I use one for Chromecasting and the other for everyday viewing.
Try this skin. I changed just the included exe file, the ini is the same. It should work with Firefox, too. With the Chrome I'm a bit in trouble, because I don't have it installed, so, I can't check the app with it.
You do not have the required permissions to view the files attached to this post.
MAHAD93
Posts: 1
Joined: February 9th, 2017, 4:56 am

Re: Youtube Video Title In Rainmeter

Post by MAHAD93 »

Hi there, Can you please provide the source code & get it to work with Opera Browser?