I
I
Igor Chernyshev2011-06-03 08:49:58
Windows
Igor Chernyshev, 2011-06-03 08:49:58

How to take daily webcam snapshots on a schedule?

Good afternoon.
The task is trifling: according to the schedule (every day, at a certain time), take pictures from the webcam, and then (not necessary, but desirable) upload them via FTP (SFTP) with a certain file format.
The problem is that you need to do this under Windows 7; under Linux, I would not have such questions. it's a couple of lines in bash.
Yesterday I rummaged through the Internet in search of suitable software, but did not find anything suitable. Could you please advise me how to solve this problem?
Problem solved
Thanks to you, the problem is solved. Here is the solution:
1. Download and install SMPlayer (it also includes mplayer).
2. Create a file with the following content (please pay attention to the file paths) take-snapshot.cmd

&quot;C:\Program Files (x86)\SMPlayer\mplayer\mplayer&quot; tv:// -ss 5 -frames 1 -vo png -vf scale=640:480<br/>
<br/>
cd &quot;C:\Users\Vir\AppData\Local\VirtualStore\Program Files (x86)\SMPlayer\mplayer\&quot;<br/>
<br/>
set _date=%date%<br/>
<br/>
ren 00000001.png %_date%.png<br/>
<br/>
ftp -v -i -s:ftp-commands.txt<br/>
<br/>
del %_date%.png

3. Create a file ftp-commands.txt in the same directory where the script is included using cmd:
open ftp-server.com<br/>
your-login<br/>
your-password<br/>
cd directory-with-your-images<br/>
send *.png<br/>
quit

And that's all. Problem solved. Launches the take-snapshot.cmd file, it takes a snapshot from the webcam and uploads it via ftp.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2011-06-03
@noonv

um... write a program and push its call into the scheduler :)
An example of a video capture program from a camera using the OpenCV library.
It remains to remake it a little so that it simply saves the frame to a file and exits. And then use the ftp client to upload the file to the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question