I need to take a snap of current image using motion. Since motion is running as a daemon I cannot take snap using fswebcam as it shows

Device or Resource is busy.

So i need a command or interrupt for motion to take a snap pf current and save it in folder

3 Answers 3


You can request that motion take a snapshot at any time via its web interface. From a command line on the Raspberry Pi running motion, use

curl -s -o /dev/null http://picam1:8080/0/action/snapshot

This will silently request that motion take a snapshot and discard the response. A symbolic link, lastsnap.jpg, in the motion file directory, will point to the snapshot itself.

See http://www.lavrsen.dk/foswiki/bin/view/Motion/RemoteControlHttpfor details on using http commands to control motion.


You could script it with a simple oneliner
/etc/init.d/motion stop && fswebcam && /etc/init.d/motion start

Replace or append fswebcam with the commands/parameters that you need


Do you need to snap a picture on demand, or just at a regular sequence? Motion can take snapshots at regular intervals. I've used it to create time lapse sequences. If this sounds useful, check out the snapshot_interval and related settings in the motion manpage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.