What software can I use to take screenshots with a set interval? I'd like to take screenshots every 2 second or so. Command-line and GUI are both ok.
I'd prefer software that can also resize and compress each screenshot.
What software can I use to take screenshots with a set interval? I'd like to take screenshots every 2 second or so. Command-line and GUI are both ok.
I'd prefer software that can also resize and compress each screenshot.
Install scrot
and then run this:
while true; do scrot & sleep 2; done
while true; do scrot & sleep 2; done
. It'll background scrot
(it runs scrot, but does not block until scrot is done)
Commented
Jun 28, 2011 at 16:50
while true; do import -window root /path/to/where/you/want/to/save/`date`.png; done
As per an edit to your question:
import threading
import os
def capture(i):
i += 1
threading.Timer(2.0, capture, [i]).start()
fill = str(i).zfill(5)
os.system("scrot scrot-%s.jpg" % fill)
os.system("streamer -o streamer-%s.jpeg -s 320x240 -j 100" % fill)
capture(0)
If you want to control the number of screenshots and/or maybe their names, you could do:
for i in {1..10};do
scrot $i'.png' && sleep 1;
done
Cheers!