Webcam Snapshot
Webcam Snapshot
This is a tiny application that will probably allow you to take pictures with a UVC webcam such as those that are built into laptops and netbooks. The gui is a ripoff of the Screencap utility and works exactly the same way. It has no preview feature, so each picture is a surprise. The upside is that it has no extra dependencies and doesn't take up much space. I will probably add a time-lapse photography feature later and maybe a script that can phone home with pictures the thief if your laptop gets stolen.
Update: I've uploaded version .2. I changed the backend from uvccapture to fswebcam which should take better pictures and support a wider variety of hardware. It now requires libgd so I'm leaving version 1 up in case you prefer the smaller size.
Update: I've uploaded version .2. I changed the backend from uvccapture to fswebcam which should take better pictures and support a wider variety of hardware. It now requires libgd so I'm leaving version 1 up in case you prefer the smaller size.
- Attachments
-
- libgd2-2.0.36-i486.pet
- (87.93 KiB) Downloaded 931 times
-
- webcamsnapshot-.2.pet
- (73.81 KiB) Downloaded 915 times
-
- webcam-snapshot.jpg
- (22.01 KiB) Downloaded 2900 times
-
- webcamsnapshot-.1.pet
- (8.72 KiB) Downloaded 750 times
Last edited by jemimah on Tue 27 Oct 2009, 04:58, edited 1 time in total.
jemimah
Thanks for this. Working fine on my 701SD.
Suggestion: Ability to choose the save dir.
Cheers
Thanks for this. Working fine on my 701SD.
Suggestion: Ability to choose the save dir.
Cheers
Puppy Linux Blog - contact me for access
- craftybear
- Posts: 62
- Joined: Tue 16 Jun 2009, 10:20
- Location: East Coast Oz in God's Country
...just prettier..craftybear wrote:Ahhhh! It's an Alienjeff clone!!!!01micko wrote:snap
Puppy Linux Blog - contact me for access
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
for video:
it will save to a.avi in your home directory (/root)
Code: Select all
ffmpeg -y -f oss -i /dev/audio -f video4linux2 -s qvga -i /dev/video0 ~/a.avi
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Lobster, you might be able to get it to work by messing with the uvccapture command on the command line. I made the arguments that worked on my EEE to be the defaults but other cameras may work better with different args.
01Micko, you're supposed to choose the save directory by choosing SaveAs from your image viewer once you get a photo you like. Just like the screencap command.
Technosaurus, that is really cool! I think I will add a button for that.
I'm working on porting UCview or at least Unicap with a light frontend. I tried Luvcview, but didn't like the UI, and I wasn't sure what to do with a pnm file on puppy. Guvcview was a lot better but the windows seemed a bit too large to be comfortable on a netbook. I guess I have to find out if SDL or Unicap is a bigger library, though SDL opens up the possibility of adding some cool games. I'll probably post packages for both UCview and Guvcview at some point if nobody has already.
01Micko, you're supposed to choose the save directory by choosing SaveAs from your image viewer once you get a photo you like. Just like the screencap command.
Technosaurus, that is really cool! I think I will add a button for that.
I'm working on porting UCview or at least Unicap with a light frontend. I tried Luvcview, but didn't like the UI, and I wasn't sure what to do with a pnm file on puppy. Guvcview was a lot better but the windows seemed a bit too large to be comfortable on a netbook. I guess I have to find out if SDL or Unicap is a bigger library, though SDL opens up the possibility of adding some cool games. I'll probably post packages for both UCview and Guvcview at some point if nobody has already.
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
A couple of points....uvc in any incarnation, Guvcview, Luvcview, Ucview...etc only work for v4l2 compliant devices, a lot of standalone web cams are v4l and will not work...Most if not all laptop built-in webcams are v4l2.
Luvcview, which dpup uses, creates snapshots in pnm format, which all modern flavours of linux(Puppy included) can convert to png, jpg, tiff or ps/pdf with the pnmto???? commands in /usr/bin. Luvcview also captures video/audio very nicely as well.
Luvcview, which dpup uses, creates snapshots in pnm format, which all modern flavours of linux(Puppy included) can convert to png, jpg, tiff or ps/pdf with the pnmto???? commands in /usr/bin. Luvcview also captures video/audio very nicely as well.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
if audio doesn't work first check that the mic volume is not turned down or muted and if that doesn't work you may try replacing 'oss' with 'alsa'
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
I tried pet 1 but it gave me a dark image. Tried pet 2 and selected both long and short delays but I could not find any output file.
I researched fswebcam and came up with the following syntax:which does give me an output file but it is too dark.
In order to get a good image I had to increase the "frame skip" as follows:
This thread offers another option (no dependencies on my Slacko 5.6 derivative) for taking a snapshot as follows:
Maybe there is a way to integrate this syntax into Jemimahs utility?
I researched fswebcam and came up with the following syntax:
Code: Select all
fswebcam -r 640x480 test.jpg -S 2
In order to get a good image I had to increase the "frame skip" as follows:
Code: Select all
fswebcam -r 640x480 test.jpg -S 5
This thread offers another option (no dependencies on my Slacko 5.6 derivative) for taking a snapshot as follows:
Code: Select all
ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:2 -frames 1 ffmpegtest.jpg