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 Camera Webcam 2 Megapixel W Autofocus New Skype Etc
Logitech QuickCam Pro 9000 Camera Webcam 2 Megapixel W Autofocus New Skype Etc $39.97
End Date: Wednesday Feb-19-2020 16:12:08 PST
Buy It Now for only: $39.97
Logitech Pro 9000 Webcam 2MP HD PC Notebook Desktop
Logitech Pro 9000 Webcam 2MP HD PC Notebook  Desktop $19.99
End Date: Sunday Jan-26-2020 13:20:04 PST
Buy It Now for only: $19.99
logitech quickcam pro 9000
logitech quickcam pro 9000 $17.00
End Date: Monday Feb-10-2020 13:16:23 PST
Buy It Now for only: $17.00
Logitech Quickcam Pro 9000 HD Webcam Retail Package
Logitech Quickcam Pro 9000 HD Webcam Retail Package $15.07 (3 Bids)
End Date: Monday Jan-20-2020 13:00:32 PST
Logitech QuickCam PRO 9000 USB Webcam Camera Carl Zeiss 2MP Mac PC SKYPE V UBM46
Logitech QuickCam PRO 9000 USB Webcam Camera Carl Zeiss 2MP Mac PC SKYPE V UBM46 $4.50
End Date: Tuesday Feb-18-2020 15:09:11 PST
Buy It Now for only: $4.50
LOGITECH V U0009 QUICKCAM PRO 9000 WEBCAM 2MP AUTOFOCUS CARL ZEISS LENS G23
LOGITECH V U0009 QUICKCAM PRO 9000 WEBCAM 2MP AUTOFOCUS CARL ZEISS LENS G23 $14.00
End Date: Wednesday Feb-19-2020 17:23:42 PST
Buy It Now for only: $14.00
Logitech Quickcam Pro 9000 HD Webcam New sealed box
Logitech Quickcam Pro 9000 HD Webcam New sealed box $9.99 (1 Bid)
End Date: Tuesday Jan-21-2020 6:29:34 PST
Logitech QuickCam Pro 9000 Webcam V UBM46
Logitech QuickCam Pro 9000 Webcam V UBM46 $5.45
End Date: Sunday Feb-9-2020 12:13:21 PST
Buy It Now for only: $5.45
Logitech QuickCam Pro 9000 Web Cam 2 CAMERAS AND INSTALL DISC
Logitech QuickCam Pro 9000 Web Cam 2 CAMERAS AND INSTALL DISC $13.99
End Date: Thursday Feb-6-2020 14:03:37 PST
Buy It Now for only: $13.99
Logitech Webcam Pro 9000
Logitech Webcam Pro 9000 $21.85
End Date: Tuesday Feb-11-2020 16:29:07 PST
Buy It Now for only: $21.85

« 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>