SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I had a Microdia PC Camera (0c45:60fc) working back under Slackware 11.0 but since could not get it to work. So I purchased a Logitech c270 the other day. Now this one won't work. I have seen numerous statements that it "works out of the box" with Slack which means it must be using SN9C102. I am running 13.37 with Xfce window manager. I read that this command would find if all was well:
mplayer -v tv:// -tv device=/dev/video0:driver=v4l2
I use mplayer to display DVDs etc. So mplayer is working. In the listing below for this command there are several defaults taken and the codec for -vo (which is not specified) seems none the less to be unable video format.
Code:
MPlayer 20101218-4.5.1 (C) 2000-2010 MPlayer Team
CPU vendor name: AuthenticAMD max cpuid level: 1
CPU: AMD Athlon(tm) XP 2200+ (Family: 6, Model: 8, Stepping: 0)
extended cpuid-level: 8
extended cache-info: 16810304
Detected cache-line size is 64 bytes
Testing OS support for SSE... yes.
Tests of OS support for SSE passed.
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNowExt: 1 SSE: 1 SSE2: 0 SSSE3: 0
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/auser/.mplayer/codecs.conf'
Reading /home/auser/.mplayer/codecs.conf: Can't open '/home/auser/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/auser/.mplayer/fonts'
Configuration: --prefix=/usr --mandir=/usr/man --confdir=/etc/mplayer --enable-gui --enable-menu --enable-largefiles --disable-arts --codecsdir=/usr/lib/codecs --language=en nl fr de es --enable-runtime-cpudetection --disable-libdvdcss-internal --disable-mp3lame --disable-mp3lame-lavc --disable-faac --disable-faac-lavc --disable-libopencore_amrnb --disable-libopencore_amrwb
CommandLine: '-v' 'tv://' '-tv' 'device=/dev/video0:driver=v4l2'
Using nanosleep() timing
get_path('input.conf') -> '/home/auser/.mplayer/input.conf'
Can't open input config file /home/auser/.mplayer/input.conf: No such file or directory
Can't open input config file /etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('.conf') -> '/home/auser/.mplayer/.conf'
Playing tv://.
get_path('sub/') -> '/home/auser/.mplayer/sub/'
STREAM: [tv] tv://
STREAM: Description: TV Input
STREAM: Author: Benjamin Zores, Albeu
STREAM: Comment:
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: SN9C1xx PC Camera
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = Camera;
Current input: 0
Format unknown (0x31384142) ( 0 bits, bayer rgb): Unknown 0x31384142
Format unknown (0x4745504a) ( 0 bits, JPEG): Unknown 0x4745504a
Current format: unknown (0x31384142)
v4l2: set format: YVU420
v4l2: set input: 0
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
Selected norm : pal
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
==> Found video stream: 0
v4l2: get format: unknown (0x31384142)
v4l2: Cannot get fps
v4l2: get width: 640
v4l2: get height: 480
Using a ring buffer for maximum 2 frames, 0 MB total size.
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
[V] filefmt:9 fourcc:0x31384142 size:640x480 fps:25.000 ftime:=0.0400
get_path('sub/') -> '/home/auser/.mplayer/sub/'
v4l2: going to capture
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 800x600 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports layers.
[x11] Using workaround for Metacity bugs.
[x11] Detected wm supports NetWM.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports FULLSCREEN state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
[VO_XV] Using Xv Adapter #0 (NV Video Blitter)
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 2046x2046
==========================================================================
Cannot find codec matching selected -vo and video format 0x31384142.
==========================================================================
v4l2: select timeout
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 1 frames dropped.
v4l2: up to 0 video frames buffered.
vo: uninit ...
Exiting... (End of file)
Please help! I have spent so much time trying to get any webcam to work.
Thnx willysr. I had seen guvcview referenced and will do.
I had considered uvc driver as it specifically supports the c270 but appears to be a pain to install and fiddle with. Will let U know how it goes.
The uvc driver is by far the easiest to install and use. I use it for all my webcams and it works perfectly. I don't use the gspca drivers, because I don't have old webcams.
Good info!! for Microdia. Please explain if U can why I had been told the driver was sn9c105 but was included in sn9c102 but the former is a bridge (what does that mean?) and the latter is a driver pulled down via modprobe. Where does one get a driver like spca5xx/LE?
U say the uvc driver is easy to download and install. Can U elaborate more (what/where) or point me to where that is described? My reading (UR uvc reference) of it made it seem way convoluted, maybe its too much info. Also I noted that it does not support single pictures.
Is the uvc driver needed for the guvcview program? It would seem so.
I am having a H... of a time trying to download guvcview cuz it always finishes with a low byte count. The action of getting the download (SourceForge) is also questionable as it repeatedly asks for a download, sometimes after I OK the confirmation response. That causes multiple images too, all short.
For Willysr: tried US, Canadian, and direct with much the same result.
Will try again later.
The mplayer command cannot have a space after v4l2 but with that removed I got this:
Code:
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: SN9C1xx PC Camera
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = Camera;
Current input: 0
Current format: unknown (0x31384142)
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: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
==========================================================================
Cannot find codec matching selected -vo and video format 0x31384142.
==========================================================================
v4l2: select timeout
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 1 frames dropped.
Exiting... (End of file)
Number 22 tried the command U suggested. Still nothing affirmative. Output follows:
Code:
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: SN9C1xx PC Camera
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = Camera;
Current input: 0
Current format: unknown (0x31384142)
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: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
==========================================================================
Cannot find codec matching selected -vo and video format 0x31384142.
==========================================================================
v4l2: select timeout
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 1 frames dropped.
Exiting... (End of file)
I have found that "Cannot find...video format 0x31384142." in almost every command I have tried. Any idea what it is telling me? I have forgotten where the codecs are stored I vaguely remember tracing codecs thinking I had somehow omitted them an the install but by recall I think I always found them.
H_TeXMeX_H, have tried the v4l before with no better/worse results. I believe the Microdia requires v4l2.
I have the following:/usr/src/linux-2.6.37.6/drivers/media/video/gspca
/usr/src/linux-2.6.37.6/include/config/usb/gspca
/lib/modules/2.6.37.6-smp/kernel/drivers/media/video/gspca
/lib/modules/2.6.37.6/kernel/drivers/media/video/gspca
I recall downloading them awhile back. Again, recall, but think that what I did to test was to remove the sn9c102 (at least) then mod-probed in the gspca and one other module which escapes me at the moment. Those tests were equally dismal.
From version 11.0 and/or 12.0 I had a horrible time until I discovered a way to force a change in device assignments. The BTTV stuff would grab the wrong device and the camera would fail. I cannot find in /proc where the devices are shown and maybe with 13.37 this is unnecessary. I thought I had found it once but cannot find my notes on it.
Have I messed up a dependency by not including the TeX in the install 2 yrs ago? I never use it and have not had a problem (that I knew of) by omitting it that I could not resolve that was attributable to it.
Is there a way to validate dependency omissions within Slackware? That would be a great little script. Or is there a list of dependencies?
When I tried tracking down the Microdia problem last time, my last thinking that there was a problem in the device assignments between it and bttv with video devices 1 & 2 being somehow switched but was not able to confirm it. FWIW
Would this code work if I were to try it with vlc rather than mplayer?
You see, I have the same problem as original poster but I have vlc installed with all codes, not so with mplayer.
Edit: I have a microsoft LifeCam3000. Your code works for me, just as it is; though it wasn't intended for me: i thank you anyway.
But i will still need a program with which to run it for skype and for taking snaps or for piping the video output to a recipient or to a recording file, no? I mean, as it is, the code you shared will get a basic screen with the cam running, but that is it: no menus, no options etc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.