Coprolite.com
Google
 
Web Coprolite.com
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Microcontrollers | Graphics | Z-80 | FreeDOS | Electronics | Odyssey 2 | 8048 | Other/Msc.

Last 30 Days | Last 60 Days | Last 90 Days | All Articles/Links


Categories:
·GNU/Linux
·Homebrew Designs
·Perl
·Microcontrollers
·Graphics
·Z-80
·FreeDOS
·Other/Msc.
·Electronics
·8048
·All Categories
·Other SignalQ Websites




Capturing Video With the Linksys WVC11B Wireless-B Internet Video Camera
Topic: Graphics   Posted:2005-09-28
Printer Friendly: Print

spacerspacer
I run a live chicken cam here, and decided it was time to get an appliance rather than a full PC to save power. The WVC11B was quite inexpensive, and does what I need. This camera streams video, but doesn't have a way to just save one frame, so my old way of simply posting an image every five minutes didn't work. The first challenge was figuring out where the stream was coming from and how to capture it live. I used MPlayer running on GNU/Linux for this, but, really, most anything will work. I can see the stream coming off of the camera with mplayer using this command:

mplayer http://user:password\@hostname/img/video.asf  

Of course, change the user, password, and host name. The escaped @ is just for the shell. To convert the stream to a 10 second video consisting of 50 frames as an MPEG-4 file:

mencoder http://user:password\@hostname/img/video.asf -o  
/home/usr-1/chickencam/chickenmovie.avi -oac lavc -ovc lavc 
-lavcopts vcodec=mpeg4 -ffourcc DX50 -endpos 10 -ofps 25 

This would make sense, and works with Microsoft Media Player 10 and mplayer, but it doesn't work with older versions of Media Player. It turns out the most compatible solution I could find, at least, was to stick with the ASF format. This is a subset of the WMV format. To convert the stream to a 10 second video consisting of 50 frames as an AVI file in ASF format:

mencoder http://user:password\@hostname/img/video.asf -o 
/home/usr-1/chickencam/chickenmovie.avi -ovc copy -endpos 10 -ofps 25 

I didn't know this, but AVI is kind of a container for video formats. It doesn't really mean much, and video viewers look within the file to figure out the format. The -ffourcc DX50 part of the above command line is used to tell the viewer that the device is MPEG-4 compatible. I have no idea what device a DX50 is, but that is what is recommended right now to fool the viewer into figuring out it is an MPEG-4 file. I'm not much of a video person, but you can find a lot of good information about this here. The reason why I'm using -ofps 25 is so I can convert to MPEG-1, but I'm still working on that. One final trick is to slice off one frame to make a single JPEG image:

mplayer /home/usr-1/chickencam/chickenmovie.avi -frames 1 -vo jpeg

You can view the results of this here.




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. Coprolite.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 Coprolite.com

Created by:
MCJ
MCJ CMS