Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i have a hama usb webcam which works fine with the fswebcam command to capture single frames but when i try to capture a video with ffmpeg i get an error:

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

the command usb-devices gives:

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

and the v4l2-ctl gives:

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
share|improve this question
    
So, what you wish is to create a video from your webcam? It must forcefully be done by using ffmpeg in a terminal? Did you already try to capture a video using cheese? –  Geppettvs D'Constanzo Sep 19 '12 at 16:30
    
if you need sudo to capture webcam, something is really wrong with the approach –  MestreLion Sep 19 '12 at 17:39
    
@GeppettvsD'Constanzo actually i am running ubuntu-server and the machine doesnt have a monitor, thats why. –  clamp Sep 19 '12 at 17:43
    
@MestreLion that sudo was there just in case... i guess it works without –  clamp Sep 19 '12 at 17:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.