Opened 12 years ago

Closed 12 years ago

#1537 closed enhancement (fixed)

CPIA pixel format not supported

Reported by: retrosnub Owned by:
Priority: wish Component: avdevice
Version: git-master Keywords: v4l2 cpia1
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

When trying to capture from webcam (/dev/video0) I get this error:

$ ./ffmpeg -v debug -f v4l2 -s 352x288 -i /dev/video0 -crf 20 out.mp4
ffmpeg version N-42509-g57d5a22 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul 14 2012 12:50:05 with gcc 4.7.1
  configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --disable-x11grab --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --disable-ffserver
  libavutil      51. 64.100 / 51. 64.100
  libavcodec     54. 38.101 / 54. 38.101
  libavformat    54. 16.104 / 54. 16.104
  libavdevice    54.  1.100 / 54.  1.100
  libavfilter     3.  2.100 /  3.  2.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[video4linux2,v4l2 @ 0x2b228c0] [3]Capabilities: 5000001
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x32315559 to 0x41495043
    Last message repeated 1 times
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x32315659 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x50323234 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x56595559 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x59565955 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x50313134 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x39565559 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x4F424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x51424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x50424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x52424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x33524742 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x33424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x34524742 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x34424752 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x59455247 to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x3231564E to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x47504A4D to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] The V4L2 driver changed the pixel format from 0x4745504A to 0x41495043
[video4linux2,v4l2 @ 0x2b228c0] Cannot find a proper format for codec_id 0, pix_fmt -1.
/dev/video0: Input/output error

Playing with

vlc v4l2:///dev/video0

works fine.

Output from "v4l-info":

$ v4l-info

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
	driver                  : "cpia1"
	card                    : "USB Camera"
	bus_info                : "usb-0000:00:1a.2-2"
	version                 : 3.2.19
	capabilities            : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
	index                   : 0
	name                    : "cpia1"
	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             : "CPIA"
	pixelformat             : 0x41495043 [CPIA]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
	type                    : VIDEO_CAPTURE
	fmt.pix.width           : 352
	fmt.pix.height          : 288
	fmt.pix.pixelformat     : 0x41495043 [CPIA]
	fmt.pix.field           : NONE
	fmt.pix.bytesperline    : 352
	fmt.pix.sizeimage       : 262144
	fmt.pix.colorspace      : SRGB
	fmt.pix.priv            : 0

controls
    VIDIOC_QUERYCTRL(BASE+0)
	id                      : 9963776
	type                    : INTEGER
	name                    : "Brightness"
	minimum                 : 0
	maximum                 : 100
	step                    : 1
	default_value           : 50
	flags                   : 0
    VIDIOC_QUERYCTRL(BASE+1)
	id                      : 9963777
	type                    : INTEGER
	name                    : "Contrast"
	minimum                 : 0
	maximum                 : 96
	step                    : 8
	default_value           : 48
	flags                   : 0
    VIDIOC_QUERYCTRL(BASE+2)
	id                      : 9963778
	type                    : INTEGER
	name                    : "Saturation"
	minimum                 : 0
	maximum                 : 100
	step                    : 1
	default_value           : 50
	flags                   : 0
    VIDIOC_QUERYCTRL(BASE+24)
	id                      : 9963800
	type                    : MENU
	name                    : "Light frequency filter"
	minimum                 : 0
	maximum                 : 2
	step                    : 1
	default_value           : 1
	flags                   : 0
    VIDIOC_QUERYCTRL(PRIVATE_BASE+0)
	id                      : 134217728
	type                    : MENU
	name                    : "Compression Target"
	minimum                 : 0
	maximum                 : 1
	step                    : 1
	default_value           : 0
	flags                   : 0

Attachments (2)

cpia_webcam_cat (2.0 MB ) - added by retrosnub 12 years ago.
sample cat dump from /dev/video0
0001-Add-CPiA-video-decoder.patch (12.0 KB ) - added by retrosnub 12 years ago.

Download all attachments as: .zip

Change History (5)

by retrosnub, 12 years ago

Attachment: cpia_webcam_cat added

sample cat dump from /dev/video0

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavdevice
Keywords: cpia1 added; pixel format cpia webcam removed
Priority: normalwish
Status: newopen
Version: unspecifiedgit-master

by retrosnub, 12 years ago

comment:2 by retrosnub, 12 years ago

I've written a decoder which works for me and my camera.
It'd be nice if someone could review it.

comment:3 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Your patch was applied.

Note: See TracTickets for help on using tickets.