[SOLVED] I found a camera. I wonder if I can make it work
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From the fact the gspca_stv06xx kernel module is loaded, your description of "a little eyeball", the lack of an internal microphone and the manual focus adjustment, then my guess is you have a Logitech Quickcam Express device or Logitech Quickcam Web device. The output from 'lsusb' should confirm.
Yes, it's a Quickcam. But now, for some reason, it has suddenly stopped working. All I get in guvcview is a blank screen, and the ffmpeg commands that worked yesterday also give me blank white page. I have no idea what I did to cause this!
Also for some reason I can't determine, the device has now changed to /dev/video1. And the front ring, which is supposed to be a focussing device (according to the tiny leaflet that came with the eyeball), changes the fps (presumably frames/sec) in gvcview though what that has to do with focussing I have no idea.
Since you're willing to try out alien's VLC, VLC also has its own 'webcam' control panel. It can be found in the 'Effects and Filters' (Ctl-E) under the 'Tools' menu pulldown. In there, there is a 'v4l2' tab section to click on and there you'll find controls to affect the exposures with. The webcam needs to be already running in VLC via its 'Open Capture Device...' feature before this v4l2 tab section can become active and useful.
Quote:
Originally Posted by hazel
Yes, that works. But you need to add -frames:v 1 before the output file name.
Thank you for this!
Quote:
Originally Posted by hazel
Also for some reason I can't determine, the device has now changed to /dev/video1.
With another video capture device, I had this experience when I pulled and plugged back in its USB cable.
Since you're willing to try out alien's VLC, VLC also has its own 'webcam' control panel. It can be found in the 'Effects and Filters' (Ctl-E) under the 'Tools' menu pulldown. In there, there is a 'v4l2' tab section to click on and there you'll find controls to affect the exposures with. The webcam needs to be already running in VLC via its 'Open Capture Device...' feature before this v4l2 tab section can become active and useful.
It's greyed out for me. What do I have to do to make it run as an "open capture device"? And while we're on the subject, what does that mean exactly? I might as well learn something while I'm here.
PS: I found a way to "open capture". I now have boxes with the following options: Image adjust, Sharpen, Banding removal and Film grain. Which of these do I need to use to give me a better picture?
Last edited by hazel; 06-07-2022 at 06:00 AM.
Reason: Added PS
It's greyed out for me. What do I have to do to make it run as an "open capture device"? And while we're on the subject, what does that mean exactly? I might as well learn something while I'm here.
It's greyed out because the webcam is not active yet in your VLC. VLC needs to be told to turn the webcam on first. That is done via the 'Open Capture Device...' option in the 'Media' pulldown in the toolbar. The shortcut is Ctrl-C. Once in there, you'll need to select your video (/dev/video0/) and your audio setup (maybe you'll need to leave this empty) in the 'Video device name' and 'Audio device name' pulldown options before you can hit the 'Play' button. Once you have the webcam running in VLC, you can then go back to the v4l2 tab section in the 'Effects and Filters' (Ctl-E) screen and work out the exposure setting.
PS: I found a way to "open capture". I now have boxes with the following options: Image adjust, Sharpen, Banding removal and Film grain. Which of these do I need to use to give me a better picture?
These are software controls -- they affect the video feed after it has come out of the webcam. Still useful to have. If you still get a greyed out v4l2 tab section despite having a webcam live feed in your VLC, then I would personally try to find a balance between the Brightness, Contrast, and maybe Gamma sliders. Maybe a tweak of Hue and Saturation afterward. They're not easy to get right and I'd use these as last resort. The controls in the v4l2 tab section are the better tool for exposure correction.
Thank you for posting the results. I was most interested in the type of video stream this webcam will output to. By my standard, that is a tiny screen size!
I'm hopelessly out of my depth here. I know you're trying hard but I can't understand most of what you're saying. Which btw is why it would be a complete waste of money for me to actually buy one of these things. I did try the link you gave but I couldn't see any sort of picture when I pressed Play. In fact this camera simply doesn't work in daylight. It shows just whiteness or a few vague streaks of colour. In the evenings I can get a picture, a rather dim one but I can improve it by using the gain control. Here's one of me that I did last night.
I'll try over the next few days just using it in dim light, then maybe I can try out your suggestions.
It is not easy. Many new things to learn. You've made it this far, you're doing great!
That picture you attached is as good as the webcam will give you. You were able to get the webcam working as it should. It's basic photography from here on. The exposure is mostly correct. You have a large bright light source (your window) on one side of the room in a relatively dark room. This strong contrast between two locations in your room will give your webcam a run for its money. Your face is lighted up by either your monitor or maybe another window nearby in front of you. Your face is also adequately exposed for. The webcam has decided to overexposed the window in order to keep your face properly exposed. What command/program were you using to acquire this image with?
For exposure improvement, I suggested to turn the webcam to leave the bright windows out of the webcam's view and shoot entirely inside of your room. Or, if you can, take the webcam outside. Pointing the webcam out the window will work too. It could not handle inside and outside at the same time during the day. Shooting at night, the exposure 'game' changes.
As for the focus, it is best to have a live feed from the webcam and change the focus ring as you watch the live feed to bring the webcam in focus.
Can you clarify this part? What kind of errors, if any, took place?
Quote:
I did try the link you gave but I couldn't see any sort of picture when I pressed Play.
I'm surprised this didn't work for you. I've found a laptop with a webcam built in. On this laptop (with full Slackware 15 stable), I started up alien's restricted VLC, opened the 'Open Capture Device' window via 'Media' in the menu bar, selected the '/dev/video0' for 'Video device name' input, left everything else alone, and clicked on the 'Play' button. Then I got a live feed from the laptop's webcam. The 'v4l2 controls' tab in 'Adjustments and Effects' also became active and I was able to control exposure of the laptop's webcam via the 'v4l2 controls' tab.
Interestingly, I still get a webcam feed in VLC if I left everything alone in the 'Open Capture Device' window (I didn't enter or pick anything) and just hit the 'Play' button from that window.
That picture you attached is as good as the webcam will give you.
Yes, that's what I suspected! Your explanation of the exposure thing is very informative. Yes, I am sitting in front of a flat screen with a large bay window on my right, facing south. The room is very brightly lit during the day and the camera won't work at all then.
Quote:
The webcam has decided to overexposed the window in order to keep your face properly exposed.
I assume you mean the webcam driver has decided. I don't think this little Chinese eyeball has much intelligence built into it. But I'm intrigued that any kind of camera setup can make decisions like that. Cameras have obviously come a long way since I was a child.
Quote:
What command/program were you using to acquire this image with?
I was using guvcview. I find vlc too complicated for my level of knowledge.
Quote:
For exposure improvement, I suggested to turn the webcam to leave the bright windows out of the webcam's view and shoot entirely inside of your room. Or, if you can, take the webcam outside. Pointing the webcam out the window will work too. It could not handle inside and outside at the same time during the day. Shooting at night, the exposure 'game' changes.
That's an excellent explanation. At the moment the eyeball is perched on top of my left-hand speaker. It's meant to go on top of the monitor (according to the leaflet) but, being old tech, it has a flat foot to rest on a cathode ray tube, not a claw to grip the top edge of a flat screen. So I'm going to try it on the right hand speaker facing inwards. We'll see if that is better. I can't take it out. It's tethered to the machine by its usb cable.
Quote:
As for the focus, it is best to have a live feed from the webcam and change the focus ring as you watch the live feed to bring the webcam in focus.
That's what I thought too. But so far I haven't got it to work as a continuous video device. I can record a video file but it doesn't change with my movement, it's just a still like a photograph. Or, in one case, two stills that kept alternating, which was very weird and rather sinister. I have no idea what I did that time!
Quote:
Can you clarify this part? What kind of errors, if any, took place?
I didn't get any error messages. Just bad results!
Quote:
I'm surprised this didn't work for you. I've found a laptop with a webcam built in. On this laptop (with full Slackware 15 stable).
Yes, I've got one of those with AntiX on it. I never tried to use the camera though I know there is one. Frankly I wasn't interested in that sort of thing until I found this little toy. But I think now that I will install v4l2 on it (I'm sure it's in the repo) and try your instructions again.
So here's the result of having the camera resting on the right hand speaker facing inwards and one window blind down. I think you'll agree that it's an improvement:
So here's the result of having the camera resting on the right hand speaker facing inwards and one window blind down. I think you'll agree that it's an improvement:
It is a big improvement.
I have been following this thread because I found the title
Quote:
I found a camera. I wonder if I can make it work
rather charming.
I do have a question though. How and where was the camera found? I am intrigued.
I do have a question though. How and where was the camera found? I am intrigued.
In Harrow (and probably in other middle-class London districts) there is a long standing convention that if you do not want something but think it might still be usable by others, you put it out by the front gate for anyone passing by to take. I've acquired a lot of stuff that way, both clothes and tech. My present monitor I bought second-hand but all the previous ones were foundlings.
This camera was placed on top of a dustbin together with an envelope containing a tiny multilingual leaflet and a cdrom with Wndows and Mac drivers. The owner could have taken it to the local tip and dropped it on the waste electronics heap but she saved herself the trouble.
I do agree that your last picture is an improvement over your previous one, but I hope you'll still let me be frank again. You're running into the webcam's exposure limitations again. Your face is now overexposed. The wall behind you goes from overexposed (lower left of image) to sort of properly exposed (upper right of image). It's just not a good webcam to expect quality images from. It doesn't have the sensor dynamic range to handle the strong contrast of the bright lights and darkness in your room. Which is probably why it was tossed out in the first place.
I installed guvcview and had a look at it on my Slackware laptop. I agreed with you in that it's much easier to work with. Very webcam orientated. Everything needed for webcam usage are up front and center. I was able to get a live feed from the builtin webcam and save the images through this program. Starting guvcview gave me two windows; the main windows with various sliders, configurations, and controls, and a live feed window from the webcam.
Quote:
Quote:
As for the focus, it is best to have a live feed from the webcam and change the focus ring as you watch the live feed to bring the webcam in focus.
That's what I thought too. But so far I haven't got it to work as a continuous video device. I can record a video file but it doesn't change with my movement, it's just a still like a photograph. Or, in one case, two stills that kept alternating, which was very weird and rather sinister. I have no idea what I did that time!
We're still talking about guvcview, yes? Did you not get a live feed or a preview window when you started guvcview on your system? I am trying to visualize your description. Perhaps your system is not able to keep up the live feed from the webcam.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.