LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-19-2003, 02:44 PM   #1
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Rep: Reputation: 30
.webcamrc file porblems


Hi All,

I have setup my logitech quick cam express ok and I created a .webcamrc file for use with my apache server to automatically upload the images to my website. The problem is I can't seem to get my .webcamrc file to constantly upload images. If I execute:

$webcam .webcamrc

It works but only takes a single image. Here is my .webcamrc file:

[grab]
device = /dev/video0
text = "My webcam! %m-%d-%Y %H:%M:%S"
fg_red = 255
fg_green = 255
fg_blue = 255
width = 320
height = 240
delay = 3
wait = 0
input = Camera
norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 100
trigger = 0
once = 0

[ftp]
dir = /var/www/html/protect
file = webcam.jpeg
tmp = uploading.jpeg
passive = 1
debug = 0
auto = 0
local = 1
ssh = 0

I created a cron job to run $webcam .webcamrc, but I can only get cron to do this every minute. How can I use the .webcamrc file to increase the video stream? Many Thanks
 
Old 09-19-2003, 04:58 PM   #2
Saraev
Member
 
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
write a PERL script to loop through running it, sleeping every X seconds. Run the perl script at startup using the /etc/rc.local file.
 
Old 09-19-2003, 10:28 PM   #3
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
Thanks for the reply, but I am not familiar with the PERL language. Can you suggest a start on looping/sleeping?

Jon
 
Old 09-20-2003, 04:21 AM   #4
Saraev
Member
 
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
#!/usr/bin/perl

for($x=0;$x<=1435;$x++) {
system("/path/to/webcam /path/to/.webcamrc");
sleep 60;
}

Put this in a file, make it executable, then run it from a cron job every 24 hours, midnight or so.

The script will run for 1435 times, sleeping for a minute each time. This is 23 hours, 55 minutes. So, you'll have five minutes a day of "down time" but that shouldn't affect anything. I put it in there to make sure it wasn't running twice on the system.

Hope this gets you going in the right direction.
 
Old 09-20-2003, 10:17 AM   #5
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
Great! Thanks for the help. I copied your script and changed some values to suit my needs and it runs great. Thanks!

Jon
 
Old 09-20-2003, 02:31 PM   #6
Saraev
Member
 
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
Cool, glad it works for you. Whenever you have a need lik that, PERL can pretty well handle it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Porblems with eth0... Hangs on Boot wardialer Mandriva 13 02-02-2005 01:50 AM
Very New to RedHat 8 Porblems tar.gz stuartmunro Red Hat 1 02-26-2004 04:54 PM
Dial up porblems IamKelso Linux - Newbie 3 08-18-2003 05:36 PM
Porblems installing Slackware 8.0 on a Thinkpad T23 Sfin Slackware 2 08-04-2002 11:48 PM
porblems configuring X windows using SaX s6moo Linux - Software 0 04-05-2001 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration