- Home
- Register
- Music
- Resumé
|
Log in
Navigation
Current poll
What is your favorite phone platform?
|
Blog PostsA few days ago I ordered the webcam I planned on using for the beaglecam. Well it came in and i thought that the first order of business would be to test and see if it would run ok on linux. surprisingly the answer was yes. it was a simple plug and play experience, didn't have to install modules or anything! to test it out I browsed the web of a quick way of getting a frame off of the web cam and stumbled on this [code]mplayer tv:// -tv driver=v4l:device=/dev/video0:width=320:height=240:outfmt=rgb24 -frames 1 -vo jpeg[/code] Unfortunately, that did not work for me. first of all instead of v4l it needed to be changed to v4l2 as there was no compatibility layer for v4l1 (I guess). After i got that working, the image that was returned was a solid green jpg.... wtf! I should have known there was some start up time but you would assume when I want a frame I want the first frame after it is fully running. frustrated i decided to change the frames argument to return 10 frames and view the 10th image. combine all that and i ended up with this script for getting frames [code] cd /tmp/cam mplayer -msglevel all=-1 tv:// -tv driver=v4l2:device=/dev/video0:width=640:height=480:outfmt=rgb24 -frames 10 -vo jpeg sleep 10 [/code] thats it! Put that shit in a loop and let it run and you have a new image every 10 seconds.
[
Comments(0)
]
|