It is currently September 21st, 2020, 1:25 pm

Feature Suggestion

Report bugs with the Rainmeter application and suggest features.
pashaak
Posts: 1
Joined: October 25th, 2019, 3:11 am

Feature Suggestion

Post by pashaak »

One thing that is badly needed in Rainmeter is Video measures and meters. It would be really cool to incorporate live video, TV, Movies even just the ability to handle .mp4 and .avi files would be nice. Is anyone working on this???
User avatar
Jeff
Posts: 153
Joined: September 3rd, 2018, 11:18 am

Re: Feature Suggestion

Post by Jeff »

You can handle AVI files with MagickMeter
https://github.com/khanhas/MagickMeter/wiki/File

If you want something more advanced, you can fake a video window using ffplay, I'm 100% you can use something like Powershell (or make a plugin yourself) to parent the ffplay window to a Rainmeter hWnd window and it just moves with the window (if it doesn't work like that just get the skin window process and set the ffplay window position every update)
dvo
Posts: 970
Joined: February 7th, 2016, 6:08 am

Re: Feature Suggestion

Post by dvo »

that will give your pc a real slowdown :P you would not like that... :D and your sliding and moving things wil stutter... so don't use it...
i used to use that only for creating images in a media player .... :rofl:
use for your things just vlc player :P works better and can handle more... :o and set it as background :P
nope media player is 1/16 of 1920 *1080 on my tv... that is 1 blured and one normal image the blured is created from the normal one and shadow
nothing more and normal text on top of it... and it s*cks already...... 8 gig 1070 gtx nvidia and 32ram and m.2 1 gb samsung 970 pro a-170 board....
i was saying it was the newer rainmeter that did it ... but it was 1 skin with magicks....
i unloaded that skin and rainmeter was smooth again...
Last edited by dvo on September 3rd, 2020, 2:45 pm, edited 7 times in total.
User avatar
Jeff
Posts: 153
Joined: September 3rd, 2018, 11:18 am

Re: Feature Suggestion

Post by Jeff »

Depends on the file size really, something like a 1920x1080 meter/window will probably be okay, more than okay actually, but if you go above 2000x2000 (at least the point where it starts lagging on my machine), good f-ing luck bottlenecking your CPU, GPU, RAM and Rainmeter's amazing D2D to GDI+ conversion (at least that's what I imagine will happen)
This is why you sould totally parent the ffplay window to the Rainmeter skin window process
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Feature Suggestion

Post by Yincognito »

Jeff wrote: September 3rd, 2020, 2:20 pm Depends on the file size really, something like a 1920x1080 meter/window will probably be okay, more than okay actually, but if you go above 2000x2000 (at least the point where it starts lagging on my machine), good f-ing luck bottlenecking your CPU, GPU, RAM and Rainmeter's amazing D2D to GDI+ conversion (at least that's what I imagine will happen)
This is why you sould totally parent the ffplay window to the Rainmeter skin window process
I contributed to a plugin for the "old" Sony Vegas doing automatic scene recognition using the ffmpeg / ffplay approach several years ago. I guess that as long as you have an appropriate "canvas" to display what ffmpeg provides and a way of communicating or integrating between ffmpeg and the other software (Rainmeter, in this case), I don't see why it shouldn't work.

So far, one can easily open or play a video, assuming he has Python installed (I'm not sure it is required, but haven't tried using a simple batch file yet). This little code in Rainmeter:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=#@#play.py
OutputType=ANSI
State=Hide
StartInFolder=#@#
DynamicVariables=1

[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Play Video
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]

[MeterResult]
Meter=String
MeasureName=MeasureRun
Y=10R
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
along with this basic Python script:

Code: Select all

import subprocess as sub
dbFile = "file.mp4"
open_dbFile = "ffplay {0} -window_title {1} -left 50 -top 50 -nostats".format(dbFile, "DB_file")
sub.Popen(open_dbFile)
will open and play a "file.mp4" video file, assuming that this file is, along with the FFMPEG files (i.e. ffmpeg.exe, ffplay.exe and ffprobe.exe) and the "play.py" Python script file are in the @Resources folder of the skin.

Of course, integrating such things as "measures" and such into Rainmeter will need a bit more than the above, but I think it wouldn't be outrageously complicated to have a strictly basic open & play behavior. Maybe the "canvas" / "container" used in the case the Image meters could be used here as well.

Naturally, I could be wrong in what I said, but I have some doubts about it.

EDIT: No need for the Python script, a simple Parameter=ffplay "file.mp4" -window_title {1} -left 50 -top 50 -nostats in [MeasureRun] above is enough. Some text is displayed after exiting, but that's a minor issue, really.
dvo
Posts: 970
Joined: February 7th, 2016, 6:08 am

Re: Feature Suggestion

Post by dvo »

how do you open a online file like youtube or a other online video?
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Feature Suggestion

Post by Yincognito »

dvo wrote: September 11th, 2020, 5:06 pm how do you open a online file like youtube or a other online video?
Just like local files, as far as I'm aware of, they can't be (yet) integrated into a Rainmeter skin, as in showing the playing window in the skin itself, but you can use the browser for this:

Code: Select all

LeftMouseUpAction=["https://www.youtube.com/watch?v=7mp2GbxhPC4"]
dvo
Posts: 970
Joined: February 7th, 2016, 6:08 am

Re: Feature Suggestion

Post by dvo »

not like that but maybe with ffplay instead of a local file...
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Feature Suggestion

Post by Yincognito »

dvo wrote: September 11th, 2020, 5:56 pm not like that but maybe with ffplay instead of a local file...
FFPlay still needs a file to be able to play (even if the file is not local, but at least extracted from the site), it won't work with plain links (although it can do live streaming, as far as I can tell).
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Feature Suggestion

Post by Yincognito »

Ha! I might just make a basic video player skin using ffmpeg, LOL. :sly:
Yes, in a Rainmeter skin - probably able to be controlled and showing info about the video file and all. ;-)

P.S. Can't guarantee its speed though, but it WILL work for sure. If it's just about the functionality and not the speed, no video measure would be needed in Rainmeter.