Запись с web-камеры

Автор: electron Дата: 18.03.2009 16:34 Не работает WEB-камера на запись.
При попытке запустить

[root@xxxxxx ~]# gstreamer-properties
вижу следующее:
gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'pulsesink'
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 'pulsesrc'

в появившейся GUI для проверки видеовхода выбираю V4l2 и название драйвера камеры
в окошке "канал" вижу: v4l2src device="/dev/video0"

нажимаю кнопку "Проверить"
и в информационном окне вижу сообщение об ошибке:

Video for Linux 2 (V4l2): Could not negotiate format.

а в терминальном окне:
gstreamer-properties-Message: Error running pipeline 'Video for Linux 2 (v4l2)': Could not negotiate format [gstbasesrc.c(2056): gst_base_src_start (): /pipeline0/v4l2src3:
Check your filtered caps, if any]

Наверное, это информативно, но мне требуется подсказка - как сделать, чтобы камера писала в видеофайл.
Для справки - в Ekiga я себя вижу.
Re: Запись с web-камеры 18.03.2009 18:32lkanter electron Пишет:
-------------------------------------------------------

> Наверное, это информативно, но мне требуется
> подсказка - как сделать, чтобы камера писала в
> видеофайл.
> Для справки - в Ekiga я себя вижу.

есть такая программа ucview, в ней есть кнопка "запись"
Re: Запись с web-камеры 18.03.2009 18:53BigAndy electron Пишет:
-------------------------------------------------------

> Наверное, это информативно, но мне требуется
> подсказка - как сделать, чтобы камера писала в
> видеофайл.
> Для справки - в Ekiga я себя вижу.


man mencoder
Re: Запись с web-камеры 19.03.2009 11:08electron пользуясь man mencoder а также мыслями из гугла делаю команду:

[xxx@xxxxx ~]$ mplayer tv:// -tv driver=v4l2:width=352:height=288:device=/dev/video0
MPlayer 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.73GHz (Family: 6, Model: 13, Stepping: Поражён
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
115 audio & 237 video codecs
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 ;-)
Selected device: Syntek USB Video Camera
Capabilites: video capture read/write streaming
supported norms: 0 = webcam;
inputs: 0 = USB;v4l2: ioctl get input failed: Invalid argument

Current input: 1
Current format: BGR24
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.
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
FPS not specified in the header or invalid, use the -fps option.
No stream found.

v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)

никакой картинки не вижу.
вот вывод от mencoder:

[xxx@xxxx ~]$ mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -nosound -ovc lavc -o 222.avi
MEncoder 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.73GHz (Family: 6, Model: 13, Stepping: Поражён
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
115 audio & 237 video codecs
success: format: 9 data: 0x0 - 0x0
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 ;-)
Selected device: Syntek USB Video Camera
Capabilites: video capture read/write streaming
supported norms: 0 = webcam;
inputs: 0 = USB;v4l2: ioctl get input failed: Invalid argument

Current input: 1
Current format: BGR24
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.
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
[V] filefmt:9 fourcc:0x59565955 size:320x240 fps: nan ftime:= nan
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 320 x 240 (preferred colorspace: Packed UYVY)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed UYVY as output csp (no 0)
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 @ 0x8700290]SwScaler: BICUBIC scaler, from uyvy422 to yuv420p using MMX2
[swscaler @ 0x8700290]SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0x8700290]SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0x8700290]SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0x8700290]SwScaler: 320x240 -> 320x240
videocodec: libavcodec (320x240 fourcc=34504d46 [FMP4])
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Forcing audio preload to 0, max pts correction to 0.
Ошибка сегментирования


вижу, что чего-то не хватает, но как исправить?
если ставлю ТВ-тюнер, то тоже не могу произвести запись, сообщения такие же.
как отладить систему?
надо писать с веб-камеры и тюнера.
Re: Запись с web-камеры 20.03.2009 10:49electron Меня настораживают эти строки:

v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument

и еще

gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'pulsesink'
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 'pulsesrc'


Что-то не так в v4l2?
Пробовал обновлять xorg-x11.....v4l , но не получилось.
В каком направлении копать, чтобы v4l не давал ошибку?
Re: Запись с web-камеры 21.03.2009 12:31Trucker Вот у меня, но камера пишет:

mencoder tv:// -tv driver=v4l2:width=352:height=288:device=/dev/video -nosound -ovc lavc -o /media/disk/1/005.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=240
MEncoder dev-SVN-r27514-4.3.0 (C) 2000-2008 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 10)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 9 data: 0x0 - 0x0
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: UVC Camera (046d:09c1)
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
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
[V] filefmt:9 fourcc:0x32595559 size:176x144 fps:15.000 ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 176 x 144 (preferred colorspace: Packed YUY2)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
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 @ 0x999ac10]BICUBIC scaler, from yuyv422 to yuv420p using MMX2
[swscaler @ 0x999ac10]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0x999ac10]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0x999ac10]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0x999ac10]176x144 -> 176x144
videocodec: libavcodec (176x144 fourcc=3234504d [MP42])
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Forcing audio preload to 0, max pts correction to 0.

New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
^CPos: 9.5s 142f ( 0%) 14.24fps Trem: 0min 0mb A-V:0.000 [42:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 42.586 kbit/s (5323 B/s) size: 50394 bytes 9.467 secs 142 frames
v4l2: ioctl set mute failed: Invalid argument
v4l2: 144 frames successfully processed, -142 frames dropped.
RSS-материал