LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Studio 13.37 (https://www.linuxquestions.org/questions/studio-13-37-99/)
-   -   Webcam image capture how? (https://www.linuxquestions.org/questions/studio-13-37-99/webcam-image-capture-how-4175421277/)

linfax 08-09-2012 03:38 PM

Webcam image capture how?
 
Hi, I would like to capture an image or a brief movie from a webcam, but I don't know which Studio1337 utility is best for this? I tried typing guvcview into a console but came up with an error:
"guvcview: error while loading shared libraries: libavcodec.so.52: cannot open shared object file: No such file or directory"

I am not familiar with most of the programs in the multimedia menu so would appreciate any suggestions which one should I use?

aus9 08-09-2012 08:15 PM

guvcview is for uvc compliant web cams

pls post the name model of your webcam and its usb details from this command pls

also is this a inbuilt web cam or on a lead?

Code:

lsusb

linfax 08-10-2012 03:07 AM

Quote:

Originally Posted by aus9 (Post 4750412)
pls post the name model of your webcam and its usb details from this command pls
also is this a inbuilt web cam or on a lead?

Thanks aus9, the webcam is inbuilt in an Acer Aspire One (model KAV60, D250-0BQk) and the lsusb output is:
Code:

sh-4.1# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1e3d:2096 
Bus 001 Device 003: ID 04f2:b084 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

so I guess the Chicony entry will be the webcam. I think it is uvc compliant as I seem to remember having used guvcview on this netbook when testing other distros.
I thought there might be an equivalent program already installed in Studio 1337.

linfax 08-11-2012 04:39 AM

I just loaded Skype as a trial and it works, so the camera is obviously hooked up and working ok, so I just need a program to access the data stream and let me take a pic or an avi.

silendo 08-11-2012 04:45 AM

You can use the Mplayer for capture image from webcam.

linfax 08-11-2012 02:40 PM

Quote:

Originally Posted by silendo (Post 4751577)
You can use the Mplayer for capture image from webcam.

Thank you. I just tried the Gnome Mplayer that is installed in Studio1337 but I can't see how to make it display the webcam image. Do you think I would need a plugin of some type? Or maybe a specific version of Mplayer?

Which part of the menu allows selection of webcam please? thx

John VV 08-11-2012 05:12 PM

gmic with the use of OpenCV is used for web cams

but you will need to wright some of the code for things more than just image capture

but most OS's have a default installed program for using a web cam


Quote:

Do you think I would need a plugin of some type? Or maybe a specific version of Mplayer?
Gnome-Mplayer is the GUI for Mplayer

Mplayer is a TERMINAL only program

see the manual page
Code:

man mplayer
--- and the help page---
mplayer --help


l0wt3ch 08-12-2012 01:25 AM

Does this help?

http://murga-linux.com/puppy/viewtopic.php?t=75203

aus9 08-12-2012 09:30 AM

ok its uvc ok

http://www.ideasonboard.org/uvc/

as local user test the module is already loaded

Code:

lsmod | grep uvc

below is my output but diff hardware
uvcvideo              61961  0
videobuf2_vmalloc      2024  1 uvcvideo
videobuf2_core        19731  1 uvcvideo
videodev              85648  1 uvcvideo
media                  10899  2 uvcvideo,videodev

if the module loads ok try running as a local user the command ....gucview....in a terminal and report any errors pls

if module not found then load it with root powers eg sudo modprobe uvcvideo

2) I believe you can also try cheese....but it pulls down too much cruft for my liking YMMV

3) I use alsa and not pulseaudio or jack so if sound issues pls report which you use pls

414N 08-12-2012 09:53 AM

Provided you installed mplayer, does
Code:

mplayer tv://
show footage from your webcam?

linfax 08-14-2012 04:08 AM

1 Attachment(s)
Quote:

Originally Posted by 414N (Post 4752367)
Provided you installed mplayer, does
Code:

mplayer tv://
show footage from your webcam?

Sorry for the delay in replying guys. I will try all suggestions soon. Starting with the "the tv://" command:, yes thanks, it does work! The image displays and I was able to use the prtsc key to capture the screenshot.

console response was:
Code:

sh-4.1# mplayer tv://
mplayer: Symbol `ff_codec_bmp_tags' has different size in shared object, consider re-linking
MPlayer SVN-r33785-4.5.2 (C) 2000-2011 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: Webcam
 Capabilities:  video capture  streaming
 supported norms:
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V:  0.0 4421/4421 ??% ??% ??,?% 0 0
v4l2: ioctl set mute failed: Invalid argument
v4l2: 4423 frames successfully processed, 401 frames dropped.

Exiting... (Quit)
sh-4.1#

The cat got in the way...
.

linfax 08-14-2012 05:06 AM

Quote:

Originally Posted by l0wt3ch (Post 4752140)

Yes thanks, that worked great. I tried it first by just installing the guvcview pet but on it's own that didn't work (missing library) so I installed the DEP pet aswell and then it was good to go. Managed to record still image and avi aswell. Fantastic.

Just realised that the inbuilt webcam is not going to help me record the screen image (facing the wrong way of course...) - I will have to work out how to ignore the inbuilt cam and activate an external wired one.

Quote:

if the module loads ok try running as a local user the command ....gucview....in a terminal and report any errors pls
Thanks aus9. Guvcview working perfectly now. And sound working too (although it has a sort of slight warbling sound. Will investigate that later)

aus9 08-14-2012 08:41 AM

in your original post you were talking webcam image so yeah

but if you mean screen image....there a lot of screen shot software ...both command and gui

I like the gui of mtpaint....it can take a screenshot or a time delay....and that will include any webcam image

eg I have a usb lead webcam but the image on the screen as been screenshot using mtpaint

http://ompldr.org/vZjNwaA/mtpaint.jpeg

linfax 08-14-2012 12:45 PM

Quote:

Originally Posted by aus9 (Post 4753911)
but if you mean screen image....there a lot of screen shot software ...both command and gui

Actually I'm hoping to be using 3 things - the webcam will be handy for some avi recordings and static screenshots will be handy for others. also I have another thread request for a "screen grabber" of the type that records mouse actions and screen contents. Theres a couple of options there but I have to skill up on the slack-build process.

Thanks for the help everyone. Much appreciated.


All times are GMT -5. The time now is 07:34 AM.