Capture and FTP upload a webcam image

To install web cam capture software on the Raspberry Pi

sudo apt-get install fswebcam

To test

fswebcam -d /dev/video0 -r 720x480 webcam.jpeg

Python Code to take picture and upload to web

#!/usr/bin/env python

import os
import ftplib

os.system("fswebcam -d /dev/video0 -r 384x288 /var/www/webcam.jpeg")

print ("Starting FTP")
session = ftplib.FTP('ftp.com','ftp@ftp.com','asdfasdfasdfasdf')
file = open('/var/www/webcam.jpeg','rb') # file to send
session.storbinary('STOR webcam.jpeg', file) # send the file
file.close() # close file and FTP
session.quit()
print ("Finished FTP")
Logitech QuickCam Pro 9000 Web Cam NEW SEALED
Logitech QuickCam Pro 9000 Web Cam NEW SEALED $34.99
End Date: Tuesday Sep-24-2019 10:17:38 PDT
Buy It Now for only: $34.99
Logitech QuickCam Pro 9000 Web Cam
Logitech QuickCam Pro 9000 Web Cam $32.00
End Date: Sunday Sep-22-2019 19:21:59 PDT
Buy It Now for only: $32.00
Logitech QuickCam Pro 9000 2MP Webcam Carl Zeiss Optics New Sealed FREE SHIPPING
Logitech QuickCam Pro 9000 2MP Webcam Carl Zeiss Optics New Sealed FREE SHIPPING $34.99
End Date: Friday Sep-6-2019 5:00:57 PDT
Buy It Now for only: $34.99
Logitech Webcam Pro 9000 Carl Zeiss Autofocus RightLight 2 Tech 720p HD Video
Logitech Webcam Pro 9000 Carl Zeiss Autofocus RightLight 2 Tech 720p HD Video $32.00
End Date: Saturday Aug-31-2019 8:40:17 PDT
Buy It Now for only: $32.00
Logitech QuickCam Pro 9000 Web Cam Brand new in box
Logitech QuickCam Pro 9000 Web Cam Brand new in box $15.90
End Date: Saturday Aug-31-2019 15:11:49 PDT
SEALED Logitech Webcam Pro 9000
SEALED Logitech Webcam Pro 9000 $69.99
End Date: Saturday Sep-14-2019 13:33:56 PDT
Buy It Now for only: $69.99
Logitech QuickCam Pro 9000 Web Cam HD720 Carl Zeiss Optics
Logitech QuickCam Pro 9000 Web Cam HD720 Carl Zeiss Optics $49.99
End Date: Tuesday Sep-17-2019 15:58:58 PDT
Buy It Now for only: $49.99
Logitech Webcam Pro 9000 for Razor Sharp HD Video with Autofocus FREE SHIPPING
Logitech Webcam Pro 9000 for Razor Sharp HD Video with Autofocus FREE SHIPPING $29.99
End Date: Thursday Sep-5-2019 8:43:18 PDT
Buy It Now for only: $29.99
Logitech Webcam Pro 9000 Carl Zeiss Autofocus RightLight 2 Tech 720p HD Video
Logitech Webcam Pro 9000 Carl Zeiss Autofocus RightLight 2 Tech 720p HD Video $28.99
End Date: Monday Sep-23-2019 10:59:07 PDT
Buy It Now for only: $28.99
Logitech Webcam Pro 9000 For Business
Logitech Webcam Pro 9000 For Business $29.89
End Date: Friday Sep-13-2019 17:50:58 PDT
Buy It Now for only: $29.89

« Previous12345...910

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>