Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Videosorveglianza
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
GabrieleB
Guru
Guru


Joined: 22 Jul 2003
Posts: 317

PostPosted: Sat Aug 11, 2007 2:31 pm    Post subject: Videosorveglianza Reply with quote

Per monitorare l'acquario durante le mie ferie mi sono fatto un piccolo tool che fa una foto ogni ora e la invia ad un webserver.
disclaimer: sono una capra in bash programming.

Necessita di:
- fswebcam http://www.firestorm.cx/fswebcam/
- ncftp
- librerie GD

e i driver per la webcam.

basta creare /tmp/webcam (dir temporanea)
e modificare i parametri ftp (user, pass, host, dir)

Code:
#!/bin/bash

HOUR="`date +%H`"
FILE="$HOUR.jpg"

/usr/local/bin/fswebcam -q -d V4L1:/dev/video0 -F 5 --banner-colour "#FF000000" --line-colour "#FF000000" --font /usr/share/fonts/freefonts/bodonib.pfb:14 /tmp/webcam/$FILE

ncftpput -V -u FTPusername -p password ftp.myserver.tld /directory /tmp/webcam/$FILE



Basta buttarlo in /etc/cron.hourly e produrra' dei file in formato 16.jpg, 18.jpg (insomma, uno per ogni ora) che verranno sovrascritti il giorno successivo.
_________________
Keyboard error. Press F1 to continue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum