Não é possível capturar vídeo de usb-webcam com ffmpeg

2

Eu tenho uma webcam hama usb que funciona bem com o comando fswebcam para capturar quadros únicos, mas quando eu tento capturar um vídeo com ffmpeg eu recebo um erro:

sudo ffmpeg -f video4linux2 -i /dev/video0 myvid.mpg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 16 2012 19:54:21 with gcc 4.6.3
  configuration:
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
[video4linux2,v4l2 @ 0x11f0440] Buffer len [0] = 12288 != 19200
/dev/video0: Operation not permitted

o comando usb-devices fornece:

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0c45 ProdID=6142 Rev=01.01
S:  Product=USB camera
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=sonixj

e o v4l2-ctl dá:

v4l2-ctl --all
Driver Info (not using libv4l2):
        Driver name   : sonixj
        Card type     : USB camera
        Bus info      : usb-bcm2708_usb-1.3
        Driver version: 3.2.27
        Capabilities  : 0x05000001
                Video Capture
                Read/Write
                Streaming
Format Video Capture:
        Width/Height  : 640/480
        Pixel Format  : 'JPEG'
        Field         : None
        Bytes per Line: 640
        Size Image    : 230990
        Colorspace    : JPEG (JFIF/ITU601)
JPEG compression:
        Quality: 90
        Markers: 0x00000018
                Define Huffman Tables
                Define Quantization Tables
Video input : 0 (sonixj: ok)
Streaming Parameters Video Capture:
        Frames per second: invalid (0/0)
        Read buffers     : 2
    
por clamp 19.09.2012 / 17:57

0 respostas