It is currently October 19th, 2020, 10:00 pm

Rain Video

Post your work-in-progress and completed skins to share and discuss.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rain Video

Post by Yincognito »

eclectic-tech wrote: September 26th, 2020, 2:53 am Updated Rain Video to V 1.2020.09.25

CHANGES
Added New action buttons (action when button is hovered by mouse)
Button visibility can be toggled so only the video shows
Video window can be moved while video is playing (it will remain 'unlinked' to skin position) See next change...
Added 'MiddleMouseUpAction' to refresh positioning (Do this after moving the skin window; this will realign the video window with the skin)
Added 'Refresh Position' to Context Menu
Added 'Repeat' toggle button

First post updated with preview images, links, and code
Very nice! :thumbup: I'm not sure executing the actions on hovering the Toggle Actions areas is the best idea - you get things dissapearing and running wihout an obvious reason, especially if not familiar with how the skin works. Doing them on click might be more natural, after all one moves the mouse a lot on the screen in a normal usage scenario, and hovering over one of those buttons by mistake is a possibility.
dvo
Posts: 1017
Joined: February 7th, 2016, 6:08 am

Re: Rain Video

Post by dvo »

why on mouse up for the buttons ? you don't wanna click? but auto-trigger it by moving over ? :confused:
for the rest nice skin :D
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4142
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rain Video

Post by eclectic-tech »

@Yincognito & dvo

Thanks for the feedback, I appreciate your thoughts.

Hover versus Click

As stated earlier, the video window and skin window are completely separate Windows objects. Neither one knows about the other and there is no interaction between them using this method of viewing and control.

In order to have button controls that do not require clicking the FFPlay window first to give it focus, I use an add-on to send key codes without changing focus away from the FFPlay window. The buttons send these key codes to the active window (FFPlay) to achieve the desired action:

ACTION | 'KEY'
Quit Video | 'q' or 'ESC'
Toggle Play/Pause | 'p' or 'Spacebar'
Frame Step | 's'
Back 10 sec | 'Left-Arrow'
Ahead 10 sec | 'Right-Arrow'
Toggle Full Screen | 'f' or 'Double-Left-Click'
Select Stream | 'w'
Vol Up | '0' or 'Asterisk'
Vol Dn | '9' or '/'
Toggle Mute | 'm'

The FFPlay window MUST have focus to respond to the viewer's requested button action. By using hover as the action trigger focus is maintained by the FFPlay window and does not change. Any mouse click outside of the FFPlay window changes the focus and those buttons no longer send the code to FFPlay, but instead, the code goes to the currently active window (which can produce undesirable actions).

Hovering over the top button, toggles the visibility of the entire list of actions.
This removes the possibility of accidentally activating an action or sending a key code to a different window. Rather than having a constantly visible 'Menu' button, I chose to hide the entire button list (my preference). You toggle the visibility by hovering in the upper-left skin area. I am thinking of hiding them after any hover action to prevent inadvertent actions.

I may change this but my reasoning was to try to achieve button controls, while not changing focus, and also reduce the chance of accidental button actions by toggling their visibility which also leaves an uncluttered view window.

An interactive plugin would allow a more conventional interface; this method is my workaround. Ideas an thoughts are welcomed. Thanks. :great:
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rain Video

Post by Yincognito »

eclectic-tech wrote: September 26th, 2020, 2:07 pmIn order to have button controls that do not require clicking the FFPlay window first to give it focus, I use an add-on to send key codes without changing focus away from the FFPlay window. The buttons send these key codes to the active window (FFPlay) to achieve the desired action.
Ah, yes, forgot about that - it makes sense now. A workaround to allow clicking instead of hover would be to "store" the name of the FFPlay active window first, normally use LeftMouseUpAction to get the user's "intention", activate back the FFPlay window based on the stored name, and send the key normally to the recently activated FFPlay window using the send key addon. This would be a bit too complicated though, so the hover action is probably the best solution that doesn't involve having to deal with other issues, and quite ingenious.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4142
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rain Video

Post by eclectic-tech »

One last update ... V 1.2020.09.27

The skin will only send codes when FFPlay has focus
The buttons have been spaced for easier use
The buttons will 'grey out' when FFPlay does not have focus to indicate they will not work
I expanded the information on the use of the player in the first post
Updated the MediaFire link and the code in the first post

Preview
rainvideo5-1.jpg
You do not have the required permissions to view the files attached to this post.
dvo
Posts: 1017
Joined: February 7th, 2016, 6:08 am

Re: Rain Video

Post by dvo »

would it be handy to use ffmpeg so you could use chromakey to set transparent and boderless is already in ffplay .. just a idea...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4142
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rain Video

Post by eclectic-tech »

dvo wrote: September 27th, 2020, 5:45 pm would it be handy to use ffmpeg so you could use chromakey to set transparent and boderless is already in ffplay .. just a idea...
I went a different way with V 1.2020.09.27a by creating separate skins for controls.
This solved the issue of control access in full screen mode; these skins are set to 'Stay Topmost'.
This also let me design other control styles: 'Text' or 'Buttons' (for now) and the end user can arrange the buttons horizontally or vertically.

Update V 1.2020.09.27a
  • Separated the control skins from main player; control skins stay topmost and can be positioned anywhere on the screen
  • Created a new image 'Button' style controls, 'Text' buttons style is still available; select style from the context menu
  • Changed control actions: removed 'full screen' (double-click video to toggle), combined volume up/down as SCROLL actions when hovering
  • Added Accent color awareness using SysColor plugin by Brian Ferguson
  • All graphics will adjust color based on Windows Accent color; color is based on you main screen wallpaper colors
Since the player now uses multiple skins, I suggest downloading the RMSKIN package from first post.

Preview
rainvideo5-4.jpg
rainvideo5-5.jpg
You do not have the required permissions to view the files attached to this post.
dvo
Posts: 1017
Joined: February 7th, 2016, 6:08 am

Re: Rain Video

Post by dvo »

i will test it today .. is ffplay a extention of ffmpeg or are they diffrent ? ffmpeg got a lot of functions like green screen maybe handy to use
with rainmeter in combi with borderless ...
buttons losing focus they got gray instead of white and are not responding if they are light gray ... :confused:
had to click on movie to get focus again.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rain Video

Post by Yincognito »

dvo wrote: September 28th, 2020, 4:37 am i will test it today .. is ffplay a extention of ffmpeg or are they diffrent ? ffmpeg got a lot of functions like green screen maybe handy to use
with rainmeter in combi with borderless ...
buttons losing focus they got gray instead of white and are not responding if they are light gray ... :confused:
had to click on movie to get focus again.
Both ffplay and ffmpeg (and also ffprobe) belong to the same "package", called - you guessed it - FFmpeg. In a nutshell:

- ffmpeg handles processing the media (e.g. extractions, conversions, muxing, demuxing, etc.)
- ffplay handles strictly playing the media (i.e. no other functions besides that, pretty straight-forward)
- ffprobe handles getting all sorts of information on the media (e.g. durations, audio/video/subtitle streams info, FPS, bitrates, etc.)

So basically doing things through ffplay (eclectic-tech's approach) is recommended, easier and lighter on CPU if you just want to play the video. Doing things through ffmpeg (my approach) is trickier, more difficult and heavier on CPU as you have to simulate cursive "playing" yourself, which almost certainly leads to some issues. The ffplay approach has no drawbacks other than not being able to provide 100% integration with Rainmeter, e.g. windows being different, controlling done by keyboard, no graphical "overlay" possible on the video, etc.

Bottom line, eclectic-tech chose the best option for this - it's pragmatic and straight to the point. My desire was to achieve "full integration" with Rainmeter (while also taking advantage of the extensive list of features in ffmpeg), but as you can see if you test my approach, while definitely possible, is not that easy to get it right.
dvo
Posts: 1017
Joined: February 7th, 2016, 6:08 am

Re: Rain Video

Post by dvo »

your approach is heavy but it would be for me the best option, about the light version (it's oke for use for a movie) :welcome:
i'm more for the options version so you could use it and blend it in the background (with chroma option) :sly:
if i make something with AE this would be nice to use the effects of it in RM. :D