It is currently September 1st, 2024, 3:01 am
Feature Suggestion
-
- Posts: 7
- Joined: October 25th, 2019, 3:11 am
Feature Suggestion
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???
~ "Things are only impossible until they are done"
-
- Posts: 346
- Joined: September 3rd, 2018, 11:18 am
Re: Feature Suggestion
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)
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)
-
- Posts: 346
- Joined: September 3rd, 2018, 11:18 am
Re: Feature Suggestion
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
This is why you sould totally parent the ffplay window to the Rainmeter skin window process
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
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.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
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
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)
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.
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
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"]
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
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).
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
Ha! I might just make a basic video player skin using ffmpeg, LOL.
Yes, in a Rainmeter skin - probably able to be controlled and showing info about the video file and all.![Wink ;-)](./images/smilies/innuendo.gif)
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.
![Sly :sly:](./images/smilies/do.gif)
Yes, in a Rainmeter skin - probably able to be controlled and showing info about the video file and all.
![Wink ;-)](./images/smilies/innuendo.gif)
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.
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
It's already working, otherwise I would have not said what I said. It's only that for now it's just the video part (no audio) and obviously it's still very very simple. In other words, it's functional, but not yet complete. Personally I would like to make it a collaborative effort, but I'm not sure other experienced folks are interested...
![Confused :confused:](./images/smilies/bn.gif)
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Feature Suggestion
There are two similar approaches on the matter, one from eclectic-tech and one from me posted in this thread, by the way. For now I recommend eclectic-tech's implementation, as it's more or less fully featured. Mine is a work in progress, and a bit more difficult to pursue due to its complete integration with Rainmeter, aka playing the video by Rainmeter itself through a Bitmap meter, instead of playing in a different window (e.g. ffplay.exe's one). In other words, even though mine is fully integrated, it requires doing more of the playing stuff through the skin code compared to eclectic-tech's one, where ffplay.exe handles entirely the playing process.