Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Webcam works with mplayer, not with Cheese, Skype
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 787

PostPosted: Wed Jan 27, 2010 7:57 pm    Post subject: Webcam works with mplayer, not with Cheese, Skype Reply with quote

My webcam works OK with mplayer only.

Linux 2.6.32-gentoo-r2 x64

Code:
lsusb
Quote:
Bus 006 Device 008: ID 0c45:6143 Microdia


Code:
lsmod
Quote:
Module Size Used by
gspca_sonixj 16554 0
gspca_main 18143 1 gspca_sonixj


Code:
mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video1 -nosound
Quote:
MPlayer SVN-r29796-4.3.2 (C) 2000-2009 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: USB camera
Capabilites: video capture read/write streaming
supported norms:
inputs: 0 = sonixj;
Current input: 0
Current format: unknown (0x4745504a)
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
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: no sound
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0xa87ef0]BICUBIC scaler, from yuv422p to yuv420p using MMX2
[swscaler @ 0xa87ef0]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xa87ef0]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xa87ef0]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0xa87ef0]640x480 -> 640x480
VO: [xv] 640x480 => 640x480 Planar YV12


Code:
dmesg
Quote:
usb 6-1: new full speed USB device using uhci_hcd and address 8
usb 6-1: New USB device found, idVendor=0c45, idProduct=6143
usb 6-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 6-1: Product: USB camera
usb 6-1: configuration #1 chosen from 1 choice
gspca: main v2.7.0 registered
gspca: probing 0c45:6143
sonixj: Sonix chip id: 12
gspca: probe ok
usbcore: registered new interface driver sonixj
sonixj: registered


What do I have to do to get it to work with Cheese and Skype?
Thanks
Back to top
View user's profile Send private message
Herring42
Guru
Guru


Joined: 10 Mar 2004
Posts: 373
Location: Buckinghamshire

PostPosted: Wed Jan 27, 2010 8:38 pm    Post subject: Reply with quote

I know the cause of the problem: The kernel interface has changed to v4l2 (from v4l1).

Skype (being binary) hasn't yet got support for the new interface.
_________________
"The problem with quotes on the internet is that it is difficult
to determine whether or not they are genuine." -- Abraham Lincoln
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 787

PostPosted: Fri Jan 29, 2010 11:23 pm    Post subject: Reply with quote

Herring42 wrote:
I know the cause of the problem: The kernel interface has changed to v4l2 (from v4l1).

Skype (being binary) hasn't yet got support for the new interface.


If that was the case then Cheese should work, right?
I am running the very latest version - media-video/cheese-2.28.1-r1

Or is mplayer able to play camera video sources that are neither v4l1 nor v4l2?

Thanks for your help.
Back to top
View user's profile Send private message
tuber
Apprentice
Apprentice


Joined: 12 Nov 2004
Posts: 267

PostPosted: Mon Feb 01, 2010 5:49 am    Post subject: Reply with quote

Could you please try
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
and
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
?
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 787

PostPosted: Mon Feb 01, 2010 10:33 am    Post subject: Reply with quote

Code:
$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
Quote:
ERROR: ld.so: object '/usr/lib/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.
When I click the TEST (video) button, I get a white square.

Code:
$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
Quote:
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
When I click the TEST (video) button, I get a white square.

Code:
$ skype
Quote:
When I click the TEST (video) button, I get a green square with multicolored snow in it...

Thanks for the tip!
Do the preload error messages mean anything really bad?
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Mon Feb 01, 2010 4:30 pm    Post subject: Reply with quote

Progman3K wrote:

Do the preload error messages mean anything really bad?

Yes. It tells you that something you specified to preload, can't be loaded. Could be permissions, but it's more likely that you don't have libv4l. Have you checked whether /usr/lib/libv4l exists at all? Depending on the outcome of that bit of research, you might want to install media-libs/libv4l .
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 787

PostPosted: Mon Feb 01, 2010 4:41 pm    Post subject: Reply with quote

boerKrelis wrote:
Have you checked whether /usr/lib/libv4l exists at all? Depending on the outcome of that bit of research, you might want to install media-libs/libv4l .

It does:
Code:
$ ls -l /usr/lib/libv4l
Quote:
total 20
-rwxr-xr-x 1 root root 5888 2009-12-20 11:52 v4l1compat.so
-rwxr-xr-x 1 root root 10080 2009-12-20 11:52 v4l2convert.so

Also, from the attributes, it appears that they CAN be executed by any user. Groups for my user:
wheel audio cdrom video games usb users portage plugdev vmware pulse-access qemu kvm vboxusers

I think the v4l libs DO get loaded when I invoke them, because the video test in Skype looks different with them (a white box) as opposed to when I just execute Skype without the v4l support (a green square with snow).

Thanks for the help.
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Mon Feb 01, 2010 5:03 pm    Post subject: Reply with quote

Isn't skype statically linked? Last time I ran it (~4 years ago or so) I think it was. Could that be the issue? libv4l is LGPL so legally it's possible.
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 787

PostPosted: Mon Feb 01, 2010 6:16 pm    Post subject: Reply with quote

boerKrelis wrote:
Isn't skype statically linked? Last time I ran it (~4 years ago or so) I think it was. Could that be the issue? libv4l is LGPL so legally it's possible.


I've built it with the USE flag qt-static because originally if you did not do that it didn't run at all

Do you think that could be the problem? Hang on, let's try the tests with it built without that flag...

Nope, same result, same error messages too.
Back to top
View user's profile Send private message
calebgray
n00b
n00b


Joined: 29 Mar 2010
Posts: 2
Location: Seattle, WA

PostPosted: Mon Mar 29, 2010 7:09 am    Post subject: Webcam Issues Reply with quote

I had similar troubles... until I...
Code:
$ emerge -av media-libs/libv4l


And ran...
Code:
$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype


Clicking "test" worked! Thanks so much for the help!

Also, the "/usr/bin/skype" is a script... I change the last line to the following so that I never had to think about it again. :D
Quote:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ./skype "$@"
Back to top
View user's profile Send private message
Herring42
Guru
Guru


Joined: 10 Mar 2004
Posts: 373
Location: Buckinghamshire

PostPosted: Mon Mar 29, 2010 11:14 am    Post subject: Re: Webcam Issues Reply with quote

calebgray wrote:

Code:
$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype



Ahhh!!!!!

Code:

LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype


Using lib32 found the correct library, and I have a working camera!

Yay!
_________________
"The problem with quotes on the internet is that it is difficult
to determine whether or not they are genuine." -- Abraham Lincoln
Back to top
View user's profile Send private message
papapenguin
l33t
l33t


Joined: 20 Sep 2005
Posts: 694
Location: Bellevue

PostPosted: Thu Apr 08, 2010 12:38 am    Post subject: Reply with quote

after many failed attempts with skype and my webcam,
Quote:
LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype

fixed my video woes, now to get my built in microphones to work WITH webcam... :?
_________________
--------------
Compaq Presario V6120US
AMD Turion 64X2
------------------------
Back to top
View user's profile Send private message
crazymonito
n00b
n00b


Joined: 01 Feb 2010
Posts: 68
Location: Boulder, CO

PostPosted: Fri May 28, 2010 10:18 pm    Post subject: Reply with quote

I'm having this exact issue but with my Panasonic GS-35. It shows up when I enter lsusb and it is even detecting whether it is in webcam mode or DV mode.
Code:
Bus 002 Device 005: ID 04da:231a Panasonic (Matsushita) NV-GS11/230/250 (DV mode)


Using mplayer shows video just fine (no sound though):
Code:
mplayer tv:// -tv driver=v4l2:device=/dev/video0
MPlayer SVN-r29796-4.3.4 (C) 2000-2009 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: DVC
 Capabilites:  video capture  streaming
 supported norms:
 inputs: 0 = Camera; 1 = MTIT;
 Current input: 0
 Current format: unknown (0x64737664)
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
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
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
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV)
==========================================================================
Audio: no sound
Starting playback...
v4l2: select timeout
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0xb7b260]BICUBIC scaler, from yuv411p to yuv420p using MMX2
[swscaler @ 0xb7b260]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xb7b260]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xb7b260]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0xb7b260]720x480 -> 720x480
VO: [xv] 720x480 => 720x480 Planar YV12
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=66
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=71
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=72
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=68
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=68
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=70
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=66
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=65
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=65
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=70
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=67
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=65
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=69
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=66
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=67
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
[dvvideo @ 0xa978c0]AC EOB marker is absent pos=64
V:   0.0 159/159 ??% ??% ??,?% 0 0

MPlayer interrupted by signal 2 in module: video_read_frame
v4l2: ioctl set mute failed: Invalid argument
v4l2: 160 frames successfully processed, 7 frames dropped.


If I try to test the camera with gstreamer-properties, it shows the device in 'Pipeline', but the test fails with an error that says:
Quote:
Video for Linux 2 (v4l2): Could not negotiate format


Here is what shows up in the terminal

Code:
gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'esdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'osssink'
gstreamer-properties-Message: Skipping unavailable plugin 'pulsesink'
gstreamer-properties-Message: Skipping unavailable plugin 'glimagesink'
gstreamer-properties-Message: Skipping unavailable plugin 'sdlvideosink'
gstreamer-properties-Message: Skipping unavailable plugin 'v4lmjpegsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'qcamsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'esdmon'
gstreamer-properties-Message: Skipping unavailable plugin 'osssrc'
gstreamer-properties-Message: Skipping unavailable plugin 'pulsesrc'

(gstreamer-properties:4731): GStreamer-WARNING **: pad v4l2src1:src returned caps which are not a real subset of its template caps
gstreamer-properties-Message: Error running pipeline 'Video for Linux 2 (v4l2)': Could not negotiate format [gstbasesrc.c(2719): gst_base_src_start (): /GstPipeline:pipeline3/GstV4l2Src:v4l2src1:
Check your filtered caps, if any]


Both Cheese and Skype fail to show any video but it does look like the camera is being detected by them. I tried the LD_PRELOAD trick for Skype but it just says that it could not be loaded and then ignores it. Any help would definitely be appreciated as I'm all out of ideas. :?

EDIT: I managed to figure it out. I was doing the LD_PRELOAD from the wrong location and my camera's default resolution is too high for Gstreamer so it wouldn't show it. Once I changed the location and set my camera to webcam mode, it worked fine.
Back to top
View user's profile Send private message
Zivarah
n00b
n00b


Joined: 17 Oct 2010
Posts: 6

PostPosted: Sun Oct 17, 2010 11:53 am    Post subject: Same problem, preloading fails Reply with quote

I am having the same problem with my webcam: Microsoft LifeCam VX-1000

mplayer tv mode works fine, detects the camera and gives great output, however Skype cannot use the camera.
At first, Skype did not see the camera at all, then after adding functionality to the kernel (doh!) and recompiling, Skype sees /dev/video0 however seems unable to use it. Clicking "Test" in the video settings gets no response.

I have tried every preload mentioned in this post, including v4l and v4l2 in lib, lib32, and lib64. [edit: lib points to lib64, doh, that was silly]. I'm relatively sure I didn't miss any, and all give the same error:
Code:
LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.

I do have the libv4l package installed:

media-libs/libv4l version 0.6.1

Everyone else that has this problem with this webcam (and most webcams in general, it would appear) seemed to have success with the preloading.

Any ideas?

Thanks,
-Ziv

[EDIT]: I saw a post on the Ubuntu forums where someone fixed this by downgrading their nvidia driver from 195 to 173, so I tried this. Turns out my graphics card (EVGA GTX 260) isn't supported in the 173 driver so it looks like I may be out of luck, at least in that regard.


Last edited by Zivarah on Mon Oct 18, 2010 8:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum