It is currently March 28th, 2024, 5:09 pm

Experiment: Video Capture

Share and get help with Plugins and Addons
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Experiment: Video Capture

Post by dgrace »

Just for fun:

If you've got a USB camera attached to your machine, give this one a shot. It works by reading the camera and spitting it out into a .bmp file every frame. (which is an ugly hack, I know) You then point an ImageMeter at the .bmp file with DynamicVariables on and... magic!

Note: it very well may not work on all cameras, I didn't make the code very robust about handling different framebuffer formats. But it seems to work ok on mine.
Note 2: I hardcoded it to reverse the X so that it's "mirrored", but another way to do this would be with a scale matrix in the ImageMeter. I haven't tried applying mask images / color tints etc. yet.

dave

Edit: updated to latest version.
Attachments
VideoCapture_1.0.3.rmskin
(108.86 KiB) Downloaded 135 times
Last edited by dgrace on April 4th, 2016, 4:41 am, edited 3 times in total.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: Experiment: Video Capture

Post by dgrace »

Actually looks like the TintColor and GreyScale work just fine - I expect MaskImage should as well, but it'll blow a bit more CPU re-loading it every frame.

Rock on,

dave
Attachments
Capture.PNG
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: Experiment: Video Capture

Post by StArL0rd84 »

Crashes Rainmeter version 3.3.0 r2519 64bit (Jan 3 2016)
btw using win10
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: Experiment: Video Capture

Post by dgrace »

StArL0rd84 wrote:Crashes Rainmeter version 3.3.0 r2519 64bit (Jan 3 2016)
btw using win10
Hmm... I finally upgraded to Win10 and recompiled the binaries, try the latest version. (updated the attachment in the OP)

dave
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Experiment: Video Capture

Post by eclectic-tech »

dgrace wrote:Hmm... I finally upgraded to Win10 and recompiled the binaries, try the latest version. (updated the attachment in the OP)

dave
th.jpg
:D
Sorry Dave, still crashes... downloaded skin version (1.0.2) and this one doesn't even let Window 10 diagnose (not that that ever helps! :p )

The Plugin list still shows this as version 1.0.0.0? :???:

Sys Specs:
4.0.0 beta r2607 64-bit (Mar 22 2016)
Windows 10 Pro 64-bit (build 10586)
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Experiment: Video Capture

Post by Socks the Fox »

Doesn't Rainmeter not replace plugin files if the version number is the same?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Experiment: Video Capture

Post by jsmorley »

Socks the Fox wrote:Doesn't Rainmeter not replace plugin files if the version number is the same?
No, it does not.

Don't be lazy... ;-)

https://docs.rainmeter.net/developers/#CreatePlugin
Note: The Rainmeter Skin Installer program, which is used by end-users to install the skins containing your plugin, will not allow the same or older version of the plugin to overwrite a newer version. The means that it is critically important that every release of your plugin must have the "File version" number incremented. If you don't do this, your plugin will not be distributed.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: Experiment: Video Capture

Post by dgrace »

Well, I did prefix this whole thing with "Experimental"... ;)

I recompiled it again and added a bunch of debug logging, which you should see in the log file if you have the Debug option checked. Also updated the version to 1.0.3 for the skin and 1.0.3.0 for the plugin. Let me know what the log shows you if it still crashes.

dave
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Experiment: Video Capture

Post by eclectic-tech »

The 'experiment' is successful! :thumbup:
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan
Contact:

Re: Experiment: Video Capture

Post by dgrace »

:thumbup:
Post Reply