Skip to first unread message

Christian James-Watkins

unread,
Aug 3, 2014, 5:45:42 PM8/3/14
to oxford-ras...@googlegroups.com
I'm trying to write a photo booth script, at the moment I have ncftp and gPhoto2 installed on the Pi. The idea is that the Pi will take a photograph, overlay the watermark and upload it to my server but I have a few problems and questions for anyone who can help.

Can anyone help me with line 17 and 21? Also how would I get the photograph names to be unique? At the moment you have to run ./booth to get the file to run, is there a way to loop the program so you just have to hit enter?

  1. #!/bin/bash
  2. # booth - version 0.1
  3. # Requires: gphoto2, ncftp
  4. # Author: Christian James-Watkins <in...@cjphotography.tk>
  5. # http://www.cjphotography.tk/docs/.booth
  6. # License: GPLv3 CJ Photography

  7. # change to directory
  8. cd Desktop
  9. cd booth

  10. # take photograph
  11. gphoto2 --capture-image-and-download

  12. # watermark image # small one in corner preferred
  13. for pic in *.jpg; do
  14.     composite -dissolve 30% -gravity south ${pic//.jpg}-marked.jpg $pic LogoW.png
  15. done

  16. # upload file
  17. ncftpput -u user -p password ftp.server.tk /public_html/booth /Desktop/booth/*.jpg

  18. # remove file
  19. rm -r *.jpg

Here is the output I am getting at the moment

  1. New file is in location /capt0000.jpg on the camera
  2. Saving file as capt0000.jpg
  3. Deleting file /capt0000.jpg on the camera
  4. Deleting 'capt0000.jpg' from folder '/'...
  5. ./booth: line 17: composite: command not found
  6. Cannot open local file /Desktop/booth/*.jpg for reading: No such file or directory.
  7. ncftpput /Desktop/booth/*.jpg: could not open file.

As you can see /Desktop/booth/ exists as that is the directory the image is being saved to, I have tried troubleshooting by removing line 20 and the images do save there. Sorry for all the questions but any help you can provide would be so helpful!

Paul MJ Stone

unread,
Aug 29, 2014, 1:10:18 PM8/29/14
to oxford-ras...@googlegroups.com
can you run 'composite' from the command line? does it need installing?

is gphoto2 deleting the image file?


Paul Brown

unread,
Oct 17, 2014, 5:33:59 PM10/17/14
to oxford-ras...@googlegroups.com
http://smstextblog.blogspot.co.uk/2014/02/night-time-wildlife-cam.html that's how I did mine basically it's the same for what you want.
Reply all
Reply to author
Forward
0 new messages