Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3436

Troubleshooting • Thermo camera as UVC Camera does not work PI4B 4gb

$
0
0
hi
i've got hikmicro mini2plus USB-C camera module. my host is PI4B 4Gb bookworm - all packages upgraded
it works on phones using hik apps
works on windows using
>ffmpeg -f dshow -video_size 256x192 -i video="UVC Camera" -c:v libx264 -pix_fmt yuv420p

i can get raw frame
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=256,height=192,pixelformat=YUYV --stream-to=frame-yuyv.mjpg --stream-count=1 --verbose --stream-mmap —stream-skip=1
and convert it to jpg

but result on linux is not what you expect from thermal camera - its a frame with 5 images together - like 5 different streams in one frame. i get that one is thermal data others different other channels.
output_image0YVYV-196.jpg

here is my data

Code:

lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 003: ID 2bdf:0102 HIK CameraBus 001 Device 002: ID 2109:3431 VIA Labs, Inc. HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code:

 v4l2-ctl --device=/dev/video0 --list-formats-extioctl: VIDIOC_ENUM_FMT        Type: Video Capture        [0]: 'YUYV' (YUYV 4:2:2)                Size: Discrete 256x344                        Interval: Discrete 0.040s (25.000 fps)                Size: Discrete 256x196                        Interval: Discrete 0.040s (25.000 fps)                Size: Discrete 256x400                        Interval: Discrete 0.040s (25.000 fps)                Size: Discrete 256x410                        Interval: Discrete 0.040s (25.000 fps)                Size: Discrete 256x250                        Interval: Discrete 0.040s (25.000 fps)        [1]: 'NV12' (Y/UV 4:2:0)                Size: Discrete 256x192                        Interval: Discrete 0.040s (25.000 fps)        [2]: 'MJPG' (Motion-JPEG, compressed)                Size: Discrete 120x160                        Interval: Discrete 0.040s (25.000 fps)                Size: Discrete 240x320                        Interval: Discrete 0.033s (30.000 fps)                Size: Discrete 640x360                        Interval: Discrete 0.033s (30.000 fps)        [3]: 'H264' (H.264, compressed)                Size: Discrete 240x320                        Interval: Discrete 0.033s (30.000 fps)

Code:

  dmesg | grep uvc[    8.011781] usbcore: registered new interface driver uvcvideo[   14.934112] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).[  121.511174] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).[  130.007425] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).[  156.368499] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).[  171.712138] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).[  350.813410] uvcvideo 1-1.2:1.1: Failed to query (130) UVC probe control : -32 (exp. 34).

i get errors like

ffmpeg -f v4l2 -video_size 256x192 -i /dev/video0 -vframes 1 -q:v 2 -f image2 output1.jpg -hide_banner -loglevel trace

Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x559a3d6650] fd:3 capabilities:84a00001
[video4linux2,v4l2 @ 0x559a3d6650] Current input_channel: 0, input_name: Camera 2, input_std: 0
/dev/video0: Input/output error


ffmpeg -f v4l2 -video_size 256x192 -pix_fmt YUYV -i /dev/video1 -vframes 1 -q:v 2 -f image2 output1.jpg -hide_banner -loglevel debug

Opening an input file: /dev/video1.
[video4linux2,v4l2 @ 0x557e33d690] fd:3 capabilities:84a00001
[video4linux2,v4l2 @ 0x557e33d690] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
/dev/video1: Inappropriate ioctl for device


im desperate already, thiking to bu y another thermo module. but i cant check all on the market buying everything.

Statistics: Posted by tu4a — Thu Sep 05, 2024 9:33 pm — Replies 0 — Views 14



Viewing all articles
Browse latest Browse all 3436

Trending Articles