Sample Header Ad - 728x90

How to record v4l webcam with ffmpeg? Cannot find a proper format for codec 'none'

4 votes
1 answer
5264 views
Goal is to capture video from my old usb webcam (device 0733:0430). Trying to save video gives this error. (I've tried both ffmpeg and avconv.) Command ffmpeg -f v4l2 -i /dev/video2 -s 160x120 tmp.mkv [video4linux2,v4l2 @ 0x815280] Time per frame unknown [video4linux2,v4l2 @ 0x815280] Cannot find a proper format for codec 'none' (id 0), pixel format 'none' (id -1) Assertion *codec_id != AV_CODEC_ID_NONE failed at /build/buildd/ffmpeg-2.3/libavdevice/v4l2.c:802 I know it can work on Linux, because I had it running a few years ago. How to get it to work now? ---- **Below is information about the device.** Device dmesg output [53008.270283] usb 2-1.2: new full-speed USB device number 4 using ehci-pci [53008.363405] usb 2-1.2: New USB device found, idVendor=0733, idProduct=0430 [53008.363416] usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [53008.779745] gspca_main: v2.14.0 registered [53008.809496] gspca_main: spca505-2.14.0 probing 0733:0430 [53008.812508] usbcore: registered new interface driver spca505 ffmpeg -list_formats 1 -f v4l2 -i /dev/video2 [video4linux2,v4l2 @ 0xbed5e0] Raw : Unsupported : S505 : 160x120 176x144 320x240 352x288 v4l-info /dev/video2 ### v4l2 device info [/dev/video2] ### general info VIDIOC_QUERYCAP driver : "spca505" card : "USB Camera (0733:0430)" bus_info : "usb-0000:00:1d.0-1.2" version : 3.13.11 capabilities : 0x85000001 [VIDEO_CAPTURE,READWRITE,STREAMING,(null)] standards inputs VIDIOC_ENUMINPUT(0) index : 0 name : "spca505" type : CAMERA audioset : 0 tuner : 0 std : 0x0 [] status : 0x0 [] video capture VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE) index : 0 type : VIDEO_CAPTURE flags : 0 description : "S505" pixelformat : 0x35303553 [S505] VIDIOC_G_FMT(VIDEO_CAPTURE) type : VIDEO_CAPTURE fmt.pix.width : 160 fmt.pix.height : 120 fmt.pix.pixelformat : 0x35303553 [S505] fmt.pix.field : NONE fmt.pix.bytesperline : 160 fmt.pix.sizeimage : 28800 fmt.pix.colorspace : SRGB fmt.pix.priv : 0 controls VIDIOC_QUERYCTRL(BASE+0) id : 9963776 type : INTEGER name : "Brightness" minimum : 0 maximum : 255 step : 1 default_value : 127 flags : 32
Asked by Rucent88 (1910 rep)
Aug 9, 2014, 12:02 PM
Last activity: Aug 3, 2025, 10:10 PM