Scanning barcode fails: not opening device

Help
Anonymous
2012-07-21
2014-04-02
  • Anonymous - 2012-07-21

    I am using OpenSUSE 12.1 with zbarcam 0.10. Whenever I try to scan a barcode, I get following error (verbose output):

    _zbar_video_open: opened camera device /dev/video0 (fd=5)
    _zbar_v4l2_probe: Integrated Camera on usb-0000:00:1a.0-1.6 driver uvcvideo (version 3.4.4)
    _zbar_v4l2_probe:     capabilities: CAPTURE STREAMING
    v4l2_reset_crop: crop bounds: 640 x 480 @ (0, 0)
    v4l2_reset_crop: current crop win: 640 x 480 @ (0, 0) aspect 1 / 1
    v4l2_probe_formats: current format: YUYV(56595559) 640 x 480 (line=0x500 size=0x96000)
    _zbar_v4l2_probe: using I/O mode: USERPTR
    _zbar_window_probe_xv: XVideo extension version 2.2
    xv_probe_port: probing port 79 with 1 encodings:
    xv_probe_port: max XV_IMAGE size 2048x2048
    xv_probe_port: 5 image formats
    v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced…
    ERROR: zbar video in v4l2_set_format():
        system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)
    WARNING: no compatible input to output format
    …trying again with output disabled
    v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced…
    ERROR: zbar video in v4l2_set_format():
        system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)
    zbar_processor_init: ERROR: no compatible video input format
    ERROR: zbar processor in zbar_processor_init():
        unsupported request: no compatible image format
    ERROR: zbar processor in zbar_processor_init():
        unsupported request: no compatible image format

    /dev/video0 is the correct device and is usable in other applications. Any idea on what is going wrong and how to fix this?

    Thanks in advance,
    Erwin

     
  • Shane

    Shane - 2012-12-06

    I'm having the same problem in Arch Linux, zbar v 0.10. Verbose output

    [jobs=0: $] zbarcam -v /dev/video0 
    _zbar_video_open: opened camera device /dev/video0 (fd=5)
    _zbar_v4l2_probe: Acer Crystal Eye webcam on usb-0000:00:1a.7-3 driver uvcvideo (version 3.6.8)
    _zbar_v4l2_probe:     capabilities: CAPTURE STREAMING
    v4l2_reset_crop: crop bounds: 640 x 480 @ (0, 0)
    v4l2_reset_crop: current crop win: 640 x 480 @ (0, 0) aspect 1 / 1
    v4l2_probe_formats: current format: YUYV(56595559) 640 x 480 (line=0x500 size=0x96000)
    _zbar_v4l2_probe: using I/O mode: USERPTR
    _zbar_window_probe_xv: XVideo extension version 2.2
    xv_probe_port: probing port 74 with 1 encodings:
    xv_probe_port: max XV_IMAGE size 2048x2048
    xv_probe_port: 5 image formats
    v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced...
    ERROR: zbar video in v4l2_set_format():
        system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)
    WARNING: no compatible input to output format
    ...trying again with output disabled
    v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced...
    ERROR: zbar video in v4l2_set_format():
        system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)
    zbar_processor_init: ERROR: no compatible video input format
    ERROR: zbar processor in zbar_processor_init():
        unsupported request: no compatible image format
    ERROR: zbar processor in zbar_processor_init():
        unsupported request: no compatible image format
    
     
  • fOB

    fOB - 2012-12-07

    I had the same problem using Gentoo. This fixed it for me:

    LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so zbarcam /dev/video1
    
     

Log in to post a comment.