LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-03-2022, 10:21 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
I found a camera. I wonder if I can make it work


Someone threw out this globe-shaped Logitech "Quickcam" USB camera and I'm intrigued by it and wonder if I could make it work. There's an included software disk for using it on Windows & MacOS but of course nothing for Linux. I found some old Linux threads on using this model but they're probably quite out of date now. It was certainly very difficult in those days but it might be easier now.

My Slackware-15 kernel (5.15.38) recognises it and autoloads a driver module called gspca_stv06xx, which is a good start. A device file link to video0 appears. I know absolutely nothing about video but this could be an interesting learning experience. Any advice would be welcome.

Last edited by hazel; 06-03-2022 at 10:24 AM.
 
Old 06-03-2022, 11:54 AM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,818

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by hazel View Post
Someone threw out this globe-shaped Logitech "Quickcam" USB camera and I'm intrigued by it and wonder if I could make it work. There's an included software disk for using it on Windows & MacOS but of course nothing for Linux. I found some old Linux threads on using this model but they're probably quite out of date now. It was certainly very difficult in those days but it might be easier now.

My Slackware-15 kernel (5.15.38) recognises it and autoloads a driver module called gspca_stv06xx, which is a good start. A device file link to video0 appears. I know absolutely nothing about video but this could be an interesting learning experience. Any advice would be welcome.
I haven't tried using my webcam on a Slackware system so I'm not certain what applications are available for it. I found a few webcam applications on OpenSUSE that do image capture, streaming, etc. and all of them recognized my AVerMedia (a brand I'd only ran across by doing a web search back when finding a Logitech was darned near impossible in the early days of the COVID lockdowns) without any fuss (I was pleasantly surprised). Slackbuild.org has "wxcam" which claims to support a large number of webcams and would certainly be worth looking into.

BTW, there's always Zoom and while their download page doesn't have a Slackware option, it does have an "other Linux OS" option that provides a link for a tar archive download. Sadly, I don't see an INSTALL or README in the archive I looked at. Maybe it's self-contained and/or dependency-free. That'd be refreshing.

HTH...
 
Old 06-03-2022, 12:03 PM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
I need an ultra-simple front end, since I have no experience in this kind of thing. digiKam already looks too complicated. I'll try building wxcam; I just checked its sourceforge page and it doesn't seem to have any major desktop dependencies. I don't want to get involved with zoom.

Last edited by hazel; 06-03-2022 at 12:05 PM.
 
Old 06-03-2022, 12:05 PM   #4
SW64
Member
 
Registered: May 2014
Distribution: Slackware
Posts: 262

Rep: Reputation: 123Reputation: 123
Look for 'Qt V4L2 test Utility' in your Applications menu. It should be included with Slackware. If you can get a live feed from your webcam through this program, then your webcam will work (usually) with other various video programs such as ffmpeg, SimpleScreenRecorder (SSR), OBS Studio (available via slackbuilds.org), etc, etc. I must warn that these software are not easy to work with if you've never work with videos before.

SSR is pretty straight forward (for me anyway) so I suggested starting with SSR to get the basics down. See the attached images for my suggestion on configuring SSR generically to capture a webcam feed. In the output screenshot, I've used the YouTube template profile and modified it. It may or may not work on your system. On your input screen, you may need to change the width/height and frame rate to match your webcam's video input. The aforementioned ffmpeg link has information that will help you find your device's specifications. I also highly recommend swapping out (upgradepkg works fine) the Slackware's default ffmpeg for alien's restricted-slackbuild ffmpeg to work with the H.264 codec properly.
Attached Thumbnails
Click image for larger version

Name:	SSR-input.jpg
Views:	10
Size:	56.0 KB
ID:	39005   Click image for larger version

Name:	SSR-output.jpg
Views:	7
Size:	50.8 KB
ID:	39006  

Last edited by SW64; 06-03-2022 at 12:12 PM.
 
1 members found this post helpful.
Old 06-03-2022, 12:13 PM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
I don't have a full slackware install with KDE. I do have ffmpeg but I've just looked at the man page for that and it seems like gobbledygook. I do like the idea of a cli tool though.
 
Old 06-03-2022, 12:21 PM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
So I tried with ffmpeg and I think it works. I followed some instructions on the ffmpeg.org site and got a file called output.mkv. But how do I display it?

Ha Ha! It works! I found a command ffplay and got an image. It doesn't show anything recognisable but you can see it's a video.

Last edited by hazel; 06-03-2022 at 12:34 PM.
 
Old 06-03-2022, 12:32 PM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
From my notes

Code:
ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -b:v 300k -s 200x150 out.mp4
ffplay -f v4l2 -s 640x480 -i /dev/video0
mpv tv:// --tv-driver=v4l2 --tv-device=/dev/video0
v4l2-ctl --list-formats-ext
v4l2-ctl --list-device
ffmpeg -f video4linux2 -list_formats all -i /dev/video0
 
1 members found this post helpful.
Old 06-03-2022, 12:39 PM   #8
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 629

Rep: Reputation: Disabled
If you have vlc it will play an mkv file. if not you may just need to add more codecs (but don't ask me what).
 
Old 06-03-2022, 12:42 PM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
No, mp4 output doesn't work. I got Unknown encoder 'libx264'. But I tried the same command as before while actually looking at the camera and I think what I can see is a very out-of-focus rendition of my face. At any rate there is what looks like two eyes, a nose and a mouth. Now I'll have to learn how to make pictures that look like something .

Yup! It's my face. I just tried it with the camera further away. This is going to give me a lot of fun.
.

Last edited by hazel; 06-03-2022 at 12:45 PM.
 
Old 06-03-2022, 12:51 PM   #10
SW64
Member
 
Registered: May 2014
Distribution: Slackware
Posts: 262

Rep: Reputation: 123Reputation: 123
Sorry, I did assumed a full Slackware installation. Yes, ffmpeg required a basic understanding of inner working of a video.

You can open the mkv videos with various media players such as mplayer, mpv (my favorite, available via slackbuilds.org), VLC (you'll want alien's restricted build, available here, to play back H.264 videos), etc, etc.

Or

You can change your ffmpeg's output extension to something you're familiar with, like avi, mov, or the most commonly used one, the mp4. ffmpeg will then automatically change its inner settings to match the video profile of the output's extension. This is sometime undesired and will lead to errors if this is not understood. At this point, this is where ffmpeg stop being easy.

Personally, Matroska (mkv) is my favorite container as I can throw in just about any formats (video codecs, audio codecs, and subtitles) I can think of in it. It being an open source codec is a bonus point, too.

Last edited by SW64; 06-03-2022 at 12:59 PM.
 
Old 06-03-2022, 12:55 PM   #11
SW64
Member
 
Registered: May 2014
Distribution: Slackware
Posts: 262

Rep: Reputation: 123Reputation: 123
Quote:
Originally Posted by hazel View Post
No, mp4 output doesn't work. I got Unknown encoder 'libx264'. But I tried the same command as before while actually looking at the camera and I think what I can see is a very out-of-focus rendition of my face. At any rate there is what looks like two eyes, a nose and a mouth. Now I'll have to learn how to make pictures that look like something .

Yup! It's my face. I just tried it with the camera further away. This is going to give me a lot of fun.
.

On Slackware 15, H.264 codec isn't included in its ffmpeg builds due to copyright restrictions. You must switch over to alien's restricted builds to be able to create and play back videos created with libx264 codec.

Congratulations on getting videos out of your webcam. Have fun!

Last edited by SW64; 06-03-2022 at 01:05 PM.
 
Old 06-03-2022, 02:27 PM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
I've found out how to focus it. Now I get a recognisable portrait. But definitely not a flattering one. OK, I call myself an old lady (I'll be 77 next month) but this makes me look like an old hag!
 
Old 06-04-2022, 06:08 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Did you know that sane can (in theory) handle webcams? The man page for the sane v4l backend warns that it is alpha software and full of bugs but I tried it just now all the same because I like scanimage. It's a relatively simple program to use. Unfortunately it doesn't quite work on this camera.I tried a full debug run and got
Code:
.....
[12:01:33.119256] [v4l] sane_open: ioctl VIDIOCSPICT failed (Invalid argument)
......
[12:01:33.120724] [v4l] sane_start
[12:01:33.120762] [v4l] sane_start: mmap frame, buffersize: 67108864 bytes, buffers: 4, offset 0 0
[12:01:33.120789] [v4l] sane_start: mmapped frame, capture 1 pict into 0x7f9dc2ede000
[12:01:33.120812] [v4l] sane_start: mmapped frame 352 x 292 with palette 1
[12:01:33.120842] [v4l] sane_start: ioctl VIDIOCMCAPTURE failed: Invalid argument
scanimage: sane_start: Invalid argument
[12:01:33.120886] [v4l] sane_cancel
[12:01:33.120912] [v4l] sane_close: trying to close handle 0x51f8f0
[12:01:33.120955] [v4l] sane_exit: all devices freed
Pity!

Last edited by hazel; 06-04-2022 at 06:11 AM.
 
Old 06-04-2022, 06:16 AM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Quote:
Originally Posted by SW64 View Post
Yes, ffmpeg required a basic understanding of inner working of a video.
Candidate for understatement of the year ?.

Sorry, no input that might be useful, but simply a compliment to those that can understand the arcane machinations of the various standards (for wont of a better name) that interfere in this space ... :sheesh:
 
Old 06-04-2022, 07:21 AM   #15
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,685

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
I've discovered something else. This camera won't work in bright sunlight; it just whites out. I did my first experiments yesterday in the evening. Today I found that I need to draw the blinds to take a photo. No doubt there's some parameter I could set to cover that. But the latest photo isn't too bad, apart from being horribly unflattering.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
Network Cards don't work with Radeon 8500dv all-in-wonder timmyh33 Linux - Networking 2 01-29-2004 10:58 PM
Getting ATI All In Wonder 128 Pro (AGP) to work StarfishRC Linux - Hardware 4 10-30-2003 10:22 PM
can't get my usb tv tuner to work (ATI TV Wonder) versaulis Linux - Software 0 10-19-2003 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration