0

I am unable to use my webcam. Running fswebcam out.png, I get the error:

Unable to find a compatible palette format.

What would be the origin of the error and how to fix it?

  • It can be a missing package issue.
  • It can be a missing module issue (uvcvideo and videodev are both loaded)

You may already stop here to answer. Please provide any micro-information that would allow me to debug this


More detailed output

# fswebcam out.png
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Unable to find a compatible palette format.

Selecting the device number directly, I get:

# fswebcam -v /tmp/1.jpg -d /dev/bus/usb/001/011
--- Opening /dev/bus/usb/001/011...
Trying source module v4l2...
/dev/bus/usb/001/011 opened.
/dev/bus/usb/001/011: Not a V4L2 device?
Trying source module v4l1...
/dev/bus/usb/001/011 opened.
/dev/bus/usb/001/011: Not a V4L device?
VIDIOCGCAP: Inappropriate ioctl for device
/dev/bus/usb/001/011 closed.
Unable to find a source module that can read /dev/bus/usb/001/011.

Verbose fswebcam output

# fswebcam -v out.jpg                       
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "uvcvideo"
src_v4l2_get_capability,89: cap.card: "GENERAL - UVC "
src_v4l2_get_capability,90: cap.bus_info: "usb-3f980000.usb-1.4"
src_v4l2_get_capability,91: cap.capabilities=0x84200001
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "Camera 1"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,520: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,533: 0: [0x47504A4D] 'MJPG' (MJPEG)
Unable to find a compatible palette format.

My webcam is clearly supporting MJPG since it figures in the v4l2-ctl:

Driver Info (not using libv4l2):
    Driver name   : uvcvideo
    Card type     : GENERAL - UVC 
    Bus info      : usb-3f980000.usb-1.4
    Driver version: 4.1.19
    Capabilities  : 0x84200001
        Video Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps   : 0x04200001
        Video Capture
        Streaming
        Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
    Width/Height      : 1280/960
    Pixel Format      : 'MJPG'
    Field             : None
    Bytes per Line    : 0
    Size Image        : 614400
    Colorspace        : Default
    Transfer Function : Default
    YCbCr Encoding    : Default
    Quantization      : Default
    Flags             : 
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 1280, Height 960
    Default     : Left 0, Top 0, Width 1280, Height 960
    Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 1280, Height 960
Selection: crop_bounds, Left 0, Top 0, Width 1280, Height 960
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30/1)
    Read buffers     : 0
                     brightness (int)    : min=1 max=255 step=1 default=-8193 value=16

The same goes with ffmpeg: I get a Input/output error:

  ffmpeg -debug 56  -f video4linux2 -s vga -i /dev/video0  /tmp/a.png 

 matched as AVOption 'debug' with argument '56'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-i' ... matched as input url with argument '/dev/video0'.
Reading option '/tmp/a.png' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input url /dev/video0.
Applying option f (force format) with argument video4linux2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x564aef20] fd:3 capabilities:84200001
[video4linux2,v4l2 @ 0x564aef20] Current input_channel: 0, input_name: Camera 1, input_std: 0
/dev/video0: Input/output error
1

It was a DV webcam:

apt-get install dvgrab
dvgrab - | mplayer -j

They may be modules to install or load too (e.g modprobe raw1394)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.