Release Script for taking pictures using a webcam


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,485
Not quite software but I still think I should put it here.

In a shell script, I wrote:


#!/bin/sh

cd /home/silent/Images/Photographs/
mplayer tv:// -vf screenshot
cd -

Change /home/silent/Images/Photographs/ to whatever path you want the pictures to be saved to.

I saved this script as /usr/local/bin/camera and made it executable. Then you just open a terminal, type 'camera' and press enter. Then press 's' on the keyboard to take a picture!
 
How did you get mplayer in the path? I need to open a pnd for that, like panplayer2zoom or smplayer2.

VLC also works to take screenshots, from within VLC:

http://www.videolan.org/support/faq.html

only the vlcsnap*.png are always saved to ./appdata/vlc for some strange reason. hotkey did not work, only through the menu. (making mplayer the better picture app)
 
Last edited by a moderator:
How did you get mplayer in the path? I need to open a pnd for that, like panplayer2zoom or smplayer2.

VLC also works to take screenshots, from within VLC:

http://www.videolan.org/support/faq.html

only the vlcsnap*.png are always saved to ./appdata/vlc for some strange reason. hotkey did not work, only through the menu. (making mplayer the better picture app)
You get the community codec pack PND and run it. It will install a bunch of nonfree codecs to your NAND, and mplayer.
 
Nice found Silent-Hunter :)

I didn't tested for now, but i hope someone build a PND with this script (also checking if the codec pack is installed first..or maybe found a way to integrate mplayer inside).
 
I really don't see the point of that, but I can do it if you want me to. It won't check for the codec pack because I don't know how to do that. I'll just mention that it requires it to be installed.
 
I can't make a PND, because the folder where the pictures are saved will be different for different people.

What about video recording?
You can do 'mplayer tv:// -vo yuv4mpeg' and it will create a .yuv file that mplayer can play back. No sound though.
 
I can't make a PND, because the folder where the pictures are saved will be different for different people.
shouldn't be a problem, don't use fixed paths. plus if it's saved in the same path as the script, it will end up in the appdata folder for the application on the SD card. 
 
I was talking about snap snap timer. But re-reading the topic i figured you guys were talking about taking pictures from a webcam. Totally missed that part.


Go ahead and ignore what i said...
 
Back
Top