Привет всем!
Дано:
1. Ось Russian Fedora Remix 20-x86_64.
2. Skype
3. проблемная USB-вебкамера Defender G-LENS 323-1.
Задача - подружить skype c этой камерой.
Что имеем:
1. Система камеру видит:
....
Bus 002 Device 003: ID 093a:2620 Pixart Imaging, Inc.
Соответственно и в dmesg появляются нужные записи. С камерой нормально работают и cheese, и guvcview, и VLC. Её опознают и утилиты v4l2. Например,
$ v4l2-ctl --all --verbose -d /dev/video0
VIDIOC_QUERYCAP: ok
Driver Info (not using libv4l2):
Driver name : gspca_pac7302
Card type : USB Camera (093a:2620)
Bus info : usb-0000:00:1d.0-1.2
Driver version: 3.16.3
Capabilities : 0x85000001
Video Capture
Read/Write
Streaming
Device Capabilities
Device Caps : 0x05000001
Video Capture
Read/Write
Streaming
Priority: 2
Video input : 0 (gspca_pac7302: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'PJPG'
Field : None
Bytes per Line: 640
Size Image : 115790
Colorspace : JPEG (JFIF/ITU601)
Streaming Parameters Video Capture:
Frames per second: invalid (0/0)
Read buffers : 2
User Controls
brightness (int) : min=0 max=32 step=1 default=16 value=16 flags=slider
contrast (int) : min=0 max=255 step=1 default=127 value=127 flags=slider
saturation (int) : min=0 max=255 step=1 default=127 value=127 flags=slider
red_balance (int) : min=0 max=200 step=1 default=100 value=100 flags=slider
blue_balance (int) : min=0 max=200 step=1 default=100 value=100 flags=slider
exposure (int) : min=0 max=1023 step=1 default=66 value=133 flags=inactive
gain_automatic (bool) : default=1 value=1 flags=update
gain (int) : min=0 max=62 step=1 default=15 value=33 flags=inactive
horizontal_flip (bool) : default=0 value=0
vertical_flip (bool) : default=0 value=0
white_balance_temperature (int) : min=0 max=255 step=1 default=55 value=55
sharpness (int) : min=0 max=15 step=1 default=8 value=8 flags=slider
Далее, пытаюсь посмотреть видео с этой камеры c помощью mplayer:
$ mplayer tv://
MPlayer SVN-r37150-4.8.3 (C) 2000-2014 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
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 (093a:2620)
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = gspca_pac7302;
Current input: 0
Current format: unknown (0x47504a50)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
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
==============================================================
Cannot find codec matching selected -vo and video format 0x47504A50.
==============================================================
v4l2: ioctl set mute failed: Invalid argument
v4l2: 2 frames successfully processed, 1 frames dropped.
Exiting... (End of file)
То есть - опаньки. Делаем, как советует гугль LD_PRELOAD:
MPlayer SVN-r37150-4.8.3 (C) 2000-2014 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
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 (093a:2620)
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = gspca_pac7302;
Current input: 0
Current format: RGB24
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
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
============================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Planar YV12
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
============================================================
Audio: no sound
Starting playback...
или
MPlayer SVN-r37150-4.8.3 (C) 2000-2014 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
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 (093a:2620)
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = gspca_pac7302;
Current input: 0
Current format: RGB24
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
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
=============================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Planar YV12
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
=============================================================
Audio: no sound
Starting playback...
......
То есть - камера с LD_PRELOAD подхватывается, в mplayer. Это диспозиция. А вот позиция печальна - skype камеру, как девайс видит, но показывает с неё только черный квадрат Малевича. Независимо от наличия или отсутствия столь эффективных LD_PRELOAD....
Вопрос, как всегда, не прост - что можно еще сделать кроме как камеру выкинуть в виндопомойку?
Ну и в догонку - в винде камера показывает очень даже неплохую картинку. А в Linux... Смотреть тошно...