View the WVC54GC User Guide from Linksys
View the WVC54GCA User Guide from Linksys
Because Linksys was caught lifting the source code for the Linux kernel, all the source code is available now from the Linksys website. Changes could certainly be made by recompiling the source and sticking it back into the camera. I haven't done that because I'm afraid of making a brick. Instead I present here some work arounds that work for me.
First some characteristics and some differences between the two models
A problem arises if a camera is located off site in a remote location with a dynamic IP address. Without a computer on the premises to send out notification of IP changes, or to run a free service like dyndns, it becomes a challange if your router doesn't support DDNS. (LinkSys offers a 3rd party 1-yr trial to a DDNS service provider but that provider is hard coded in the camera so I cannot use a different one, like my own - I don't do free trials). My solution is to use motion detection to receive emails whereupon I can extract the IP address from the email. The WVC54GCA allows me to set up to 10 scheduled times when motion detection is activated so I set 8:00 - 8:15, 9:00 - 9:15, ... , 17:00 - 17:15. I also use the following settings:
This gives me a 15 minute time window every hour from 8 to 5 and with the camera viewing an outdoor scene some motion is bound to occur within that time window. The 15 minute delay coupled with the 15 minute scheduled window insures that the cam only sends one email per hour between 8 and 5. I set up a special email account just for the cams. A cron job processes the emails and extracts the IP address which is stored. If the IP address changes, I get email. The attached video is MJPEG, so there is no conflict with max frame rate settings when also streaming audio. In other words, set the max frame rate to 1 fps for MJPEG and 30 fps for MPEG-4.
The WVC54GC has different options and I set Delay between E-mails to 30 minutes and De-select "E-Mail Video" which just sends a basic email with no attachment every 30 minutes, assuming there's some motion.
If you find that your camera cannot send email through your ISP it may be because they have a broken SMTP server that won't allow non-alphanumeric characters in the HELO handshake. The camera sends helo (Camera Name) so if your Camera Name is Cam_1, that underscore will keep the mail from going through. Rename it to Cam1. You can also set an alternate SMTP port (with the WVC54GCA) and use your own SMTP server if your ISP blocks port 25. Many hosting providers allow port 2525.
Once you start getting email from the camera(s) you can extract the IP addresses, as noted above.
You can also set up ftp transfers, although I don't do that because I don't run any ftp servers.
One other note regarding remote cam locations with no computer. It might be a good idea to install a timer to recycle the power every couple of days for a few seconds (or whatever the timer allows) if you experience lock up problems with either the router or cam. This will keep you from having to make a trip to the site.
With the problem of dynamic IP addresses resolved, I'll move on to storing surveilance images. So far, the only program I've found that does the job is mplayer. A cron job calls my shell script every minute. My shell script calls mplayer every 15 seconds (4 calls total) to capture one frame during each call and store it. The code snippet that does that is:
/usr/bin/mplayer \
http://$user:$pass@$camaddr:$port/img/video.asf \
-nosound \
-really-quiet \
-frames 1 \
-nocache \
-vo jpeg:outdir=$imgdir \
&> /dev/null
Mplayer will write one frame to the file 00000001.jpg and place it in the directory $imgdir
You can then scp that file to an off-site host for safe keeping.
Keep a running sequence number to rename the destination file.
I use
00000001.0.jpg for the first frame
00000001.1.jpg for the second frame (which is 15 seconds after the first one)
00000001.2.jpg for the third frame
00000001.3.jpg for the last frame of that minute, then
00000002.0.jpg for the first frame of the next minute, etc.
Any such scheme will work. Pick one you like. To play back the images I use feh like so:
feh -xD0 *jpg
This tells feh to not insert any delay between frames (-D0) and to not use a border around the image (-x) (speeds up the display). With this, I can view a time-lapse display of a full day in about 30 seconds over the LAN at 320x240 resolution.
At the end of each day I make a directory on the remote host of the form YYYYMMDD and dump all the day's images into that, reset my sequence counter, and I'm ready for the next day's worth of picures. Cron jobs and shell scripts do all the heavy lifting. All I do is review the time-lapse for any interesting events.
The camera is supposed to sync with a time server when it powers up. It doesn't. The date on power up is 01/01/2005 and the time is 00:00:00, I have left cameras running for over 24 hours and they do not correct their time. If you press the "sync with computer" button on the web page, even though the camera is not connected to a computer, the page will return all messed up but on refresh, the time is correct. Another option is to select a different time zone, apply it, select back the original and apply that. This triggers the cam to contact a ntp server. Of course you can also set the time by hand
Capturing video to an animated GIF:
mplayer http://camIP/img/video.asf -frames 100 -fps 20 -vo gif89a
Capturing Video using ffmpeg
ffmpeg -i http://camip/img/video.asf -vcodec mjpeg -b 900k outfile.mjpeg
-b is the bit rate
and press Q to stop recording.
Creating a video from stills.
Thanks to: http://www.cenolan.com/2009/05/simple-time-lapse-video-in-linux/
aptitude install timelapse
Add to sources.lst: deb http://www.debian-multimedia.org lenny main
aptitude update
aptitude install debian-multimedia-keyring
aptitude update
aptitude install mencoder
Create the file files.txt with ls *jpg > files.txt
Create the video, webcam.avi, with:
mencoder \
-nosound \
-ovc lavc \
-lavcopts vcodec=mpeg4 \
-o webcam.avi \
-mf type=jpeg:fps=20 \
mf://@files.txt
Note that there is both a mf and a -mf option (see man 1 mplayer)
This will encode all the files listed in files.txt into a movie called webcam.avi using the mpeg4 encoder with no sound and a framerate of 20 frames per second.
EMBEDING
Embeding video from the WVC54GCA is a no-brainer, thanks to the first link below. The WVC54GC is a different story. I still have not successfully embeded this cam, nor have I come across any how-tos that work, although there are many hints on the 'net.
So far what I have tried:
Install and enable greasemonkey (see the link below)
Install the vlc plugin (sudo apt-get install mozilla-plugin-vlc)
Now I get a window but it's all black and says (no video) but
that's progress.
Some links where I found info:
![]() |
This site best viewed with a browser |
| Warning: This is a Debian centric site | |
| Many thanks to Debra and Ian Murdock for making Debian possible | |
| First created Apr 22, 2008 ~ Last revised November 15, 2009 |