[sane-devel] Fwd: book scanner recognized as v4l device - Invalid argument VIDIOCSPICT and VIDIOCMCAPTURE

netukar201409+sane at mailbox.org netukar201409+sane at mailbox.org
Sun Oct 11 13:46:19 BST 2020


Hello,

I tried the following command but got an empty output file

SANE_DEBUG_V4L=128 scanimage -v -d v4l:/dev/video2 >myfirstscan.pnm; ll 
myfirstscan.pnm

Output format is not set, using pnm as a default.
[14:42:37.362354] [sanei_debug] Setting debug level of v4l to 128.
[14:42:37.362406] [v4l] SANE v4l backend version 1.0 build 5 from 
sane-backends 1.0.30-970-gd00af49e3
[14:42:37.362447] [v4l] attach: trying to open /dev/bttv0
[14:42:37.362471] [v4l] attach: failed to open device `/dev/bttv0': No 
such file or directory
[14:42:37.362481] [v4l] attach: trying to open /dev/video0
[14:42:37.377588] [v4l] attach: found videodev `USB2.0 HD UVC WebCam: 
USB2.0 HD' on `/dev/video0'
[14:42:37.377729] [v4l] attach: trying to open /dev/video1
[14:42:37.377962] [v4l] attach: failed to open device `/dev/video1': 
Invalid argument
[14:42:37.377992] [v4l] attach: trying to open /dev/video2
[14:42:37.381738] [v4l] attach: found videodev `JY-VP216: JY-VP216' on 
`/dev/video2'
[14:42:37.381768] [v4l] attach: trying to open /dev/video3
[14:42:37.381787] [v4l] attach: failed to open device `/dev/video3': No 
such file or directory
[14:42:37.381813] [v4l] sane_open: device /dev/video2 found in devlist
[14:42:37.385321] [v4l] sane_open: 1 channels, 0 audio devices
[14:42:37.385349] [v4l] sane_open: minwidth=1280, minheight=720, 
maxwidth=4896, maxheight=3672
[14:42:37.385360] [v4l] sane_open: V4L device can capture to memory
[14:42:37.385372] [v4l] sane_open: channel 0 (Camera 1), tuners=0, 
flags=0x0, type=2, norm=0
[14:42:37.385385] [v4l] sane_open: input is camera input
libv4l2: error setting pixformat: Device or resource busy
libv4l1: error setting pixformat: Device or resource busy
[14:42:37.385429] [v4l] sane_open: brightness=26214, hue=0, 
colour=30583, contrast=34952
[14:42:37.385439] [v4l] sane_open: whiteness=0, depth=0, palette=0
[14:42:37.386165] [v4l] sane_open: ioctl VIDIOCSPICT failed (Invalid 
argument)
[14:42:37.386190] [v4l] sane_open: x=0, y=0, width=4608, height=3456
[14:42:37.386208] [v4l] sane_get_option_descriptor: option 0 (Number of 
options)
[14:42:37.386219] [v4l] sane_control_option: get option 0 (Number of 
options)
[14:42:37.386234] [v4l] sane_get_option_descriptor: option 0 (Number of 
options)
[14:42:37.386244] [v4l] sane_control_option: get option 0 (Number of 
options)
[14:42:37.386253] [v4l] sane_get_option_descriptor: option 1 (Scan Mode)
[14:42:37.386262] [v4l] sane_get_option_descriptor: option 2 (mode)
[14:42:37.386274] [v4l] sane_get_option_descriptor: option 3 (channel)
[14:42:37.386285] [v4l] sane_get_option_descriptor: option 4 (Geometry)
[14:42:37.386297] [v4l] sane_get_option_descriptor: option 5 (tl-x)
[14:42:37.386310] [v4l] sane_get_option_descriptor: option 6 (tl-y)
[14:42:37.386320] [v4l] sane_get_option_descriptor: option 7 (br-x)
[14:42:37.386332] [v4l] sane_get_option_descriptor: option 8 (br-y)
[14:42:37.386344] [v4l] sane_get_option_descriptor: option 9 (Enhancement)
[14:42:37.386356] [v4l] sane_get_option_descriptor: option 10 (brightness)
[14:42:37.386369] [v4l] sane_get_option_descriptor: option 11 (hue)
[14:42:37.386381] [v4l] sane_get_option_descriptor: option 12 (color)
[14:42:37.386393] [v4l] sane_get_option_descriptor: option 13 (contrast)
[14:42:37.386405] [v4l] sane_get_option_descriptor: option 14 (white-level)
[14:42:37.386417] [v4l] sane_control_option: get option 7 (br-x)
[14:42:37.386429] [v4l] sane_control option: option is inactive
[14:42:37.386440] [v4l] sane_control_option: get option 5 (tl-x)
[14:42:37.386453] [v4l] sane_control option: option is inactive
[14:42:37.386465] [v4l] sane_control_option: get option 8 (br-y)
[14:42:37.386477] [v4l] sane_control option: option is inactive
[14:42:37.386488] [v4l] sane_control_option: get option 6 (tl-y)
[14:42:37.386500] [v4l] sane_control option: option is inactive
[14:42:37.386514] [v4l] sane_control_option: get option 5 (tl-x)
[14:42:37.386525] [v4l] sane_control option: option is inactive
[14:42:37.386537] [v4l] sane_get_option_descriptor: option 7 (br-x)
scanimage: ignored request to set inactive option br-x
[14:42:37.386554] [v4l] sane_control_option: get option 6 (tl-y)
[14:42:37.386566] [v4l] sane_control option: option is inactive
[14:42:37.386578] [v4l] sane_get_option_descriptor: option 8 (br-y)
scanimage: ignored request to set inactive option br-y
[14:42:37.386628] [v4l] sane_start
[14:42:37.386669] [v4l] sane_start: mmap frame, buffersize: 67108864 
bytes, buffers: 4, offset 0 0
[14:42:37.386694] [v4l] sane_start: mmapped frame, capture 1 pict into 
0x7f41fde29000
[14:42:37.386713] [v4l] sane_start: mmapped frame 4608 x 3456 with palette 1
[14:42:37.387062] [v4l] sane_start: ioctl VIDIOCMCAPTURE failed: Invalid 
argument
scanimage: sane_start: Invalid argument
[14:42:37.387125] [v4l] sane_cancel
[14:42:37.387144] [v4l] sane_close: trying to close handle 0x55a0cf21a220
[14:42:37.387184] [v4l] sane_exit: all devices freed


-rw-r--r-- 1 charly charly 0 Okt 3 14:42 myfirstscan.pnm


Regards,

---

Michael Dittmer

FSFE fellower

Am 2020-10-03 um 12:09 schrieb Pim van Tend:
> SANE_DEBUG_V4L=128 scanimage -v -d v4l:/dev/video2 >myfirstscan.pnm
>
> is the command to write your scan to myfirstscan.pnm
> Without the >-clause scanimage refuses to work.
>
> If you just want to experiment without looking at tje scan, usr 
> >/dev/null



More information about the sane-devel mailing list