I’m trying streaming rgb from 12-bit raw bayer bggr using OpenCV and V4L2 in Jetson.
But, “Device or resource busy” error occured both in V4L2 COMMAND and CPP CODE.
Maybe, background apps use my camera automatically, but I cannot find or quit even if reboot and process kill.
Below is my trials and their logs:
[DEVICE]
Jetson: Orin Nano Development Kit + Jetpack 5.1.2
Camera: e-CAM121_CUONX - 12MP Sony® Starvis™ IMX412 Ultra Low Light Camera for NVIDIA® Jetson Orin NX / Orin Nano
[V4L2 COMMAND]
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=BG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=frame.raw
[COMMAND RESULT]
VIDIOC_S_EXT_CTRLS: failed: Device or resource busy
bypass_mode: Device or resource busy
VIDIOC_S_FMT: failed: Device or resource busy
VIDIOC_REQBUFS returned -1 (Device or resource busy)
[CPP CODE]
// simple_camera.cpp
// MIT License
// Copyright (c) 2019-2022 JetsonHacks
// See LICENSE for OpenCV license and additional information
// Using a CSI camera (such as the Raspberry Pi Version 2) connected to a
// NVIDIA Jetson Nano Developer Kit using OpenCV
// Drivers for the camera and OpenCV are included in the base image
#include <opencv2/opencv.hpp>
std::string gstreamer_pipeline (int capture_width, int capture_height, int display_width, int display_height, int framerate, int flip_method) {
return "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)" + std::to_string(capture_width) + ", height=(int)" +
std::to_string(capture_height) + ", framerate=(fraction)" + std::to_string(framerate) +
"/1 ! nvvidconv flip-method=" + std::to_string(flip_method) + " ! video/x-raw, width=(int)" + std::to_string(display_width) + ", height=(int)" +
std::to_string(display_height) + ", format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
}
int main()
{
int capture_width = 1920 ;
int capture_height = 1088;
int display_width = 1280 ;
int display_height = 720 ;
int framerate = 30 ;
int flip_method = 0 ;
std::string pipeline = gstreamer_pipeline(capture_width,
capture_height,
display_width,
display_height,
framerate,
flip_method);
std::cout << "Using pipeline: \n\t" << pipeline << "\n";
cv::VideoCapture cap(0, cv::CAP_V4L2);
// cap.set(cv::CAP_PROP_FOURCC, *"BG12");
cap.set(cv::CAP_PROP_FRAME_WIDTH, 1920);
cap.set(cv::CAP_PROP_FRAME_HEIGHT, 1088);
if(!cap.isOpened()) {
std::cout<<"Failed to open camera."<<std::endl;
return (-1);
}
cv::namedWindow("CSI Camera", cv::WINDOW_AUTOSIZE);
cv::Mat img;
std::cout << "Hit ESC to exit" << "\n" ;
while(true)
{
if (!cap.read(img)) {
std::cout<<"Capture read error"<<std::endl;
break;
}
// cv::cvtColor(img, img, cv::COLOR_BayerBG2BGR);
cv::imshow("CSI Camera", img);
int keycode = cv::waitKey(10) & 0xff ;
if (keycode == 27) break ;
}
cap.release();
cv::destroyAllWindows() ;
return 0;
}
[LOG]
Using pipeline:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1088, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/videoio_registry.cpp (197) VideoBackendRegistry VIDEOIO: Builtin backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/videoio_registry.cpp (221) VideoBackendRegistry VIDEOIO: Available backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[ INFO:0@0.001] global /home/enerzai/opencv/modules/videoio/src/videoio_registry.cpp (223) VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); FIREWIRE(940); UEYE(930)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (897) open VIDEOIO(V4L2:/dev/video0): opening...
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (913) open VIDEOIO(V4L2:/dev/video0): deviceHandle=3
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYCAP(2154321408), failIfBusy=1)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYCAP(2154321408), ...) => 0 errno=0 (Success)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_G_FMT(3234878980), failIfBusy=1)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_G_FMT(3234878980), ...) => 0 errno=0 (Success)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.001] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_PARM(3234616854), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_PARM(3234616854), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_G_PARM(3234616853), failIfBusy=1)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_G_PARM(3234616853), ...) => 0 errno=0 (Success)
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (606) setFps VIDEOIO(V4L2:/dev/video0): FPS=60/1
[DEBUG:0@0.002] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_REQBUFS(3222558216), failIfBusy=1)
[DEBUG:0@0.030] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_REQBUFS(3222558216), ...) => 0 errno=0 (Success)
[DEBUG:0@0.030] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.030] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.032] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.032] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.033] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.033] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.034] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.034] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.039] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_REQBUFS(3222558216), failIfBusy=1)
[DEBUG:0@0.309] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_REQBUFS(3222558216), ...) => 0 errno=0 (Success)
[DEBUG:0@0.309] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYCAP(2154321408), failIfBusy=1)
[DEBUG:0@0.309] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYCAP(2154321408), ...) => 0 errno=0 (Success)
[DEBUG:0@0.309] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_G_FMT(3234878980), failIfBusy=1)
[DEBUG:0@0.309] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_G_FMT(3234878980), ...) => 0 errno=0 (Success)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_FMT(3234878981), failIfBusy=1)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_FMT(3234878981), ...) => 0 errno=0 (Success)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_S_PARM(3234616854), failIfBusy=1)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_S_PARM(3234616854), ...) => 0 errno=0 (Success)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_G_PARM(3234616853), failIfBusy=1)
[DEBUG:0@0.310] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_G_PARM(3234616853), ...) => 0 errno=0 (Success)
[DEBUG:0@0.311] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (606) setFps VIDEOIO(V4L2:/dev/video0): FPS=60/1
[DEBUG:0@0.311] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_REQBUFS(3222558216), failIfBusy=1)
[DEBUG:0@0.342] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_REQBUFS(3222558216), ...) => 0 errno=0 (Success)
[DEBUG:0@0.343] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.343] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.344] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.344] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.346] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.346] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.347] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QUERYBUF(3227014665), failIfBusy=1)
[DEBUG:0@0.347] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QUERYBUF(3227014665), ...) => 0 errno=0 (Success)
[DEBUG:0@0.348] global /home/enerzai/opencv/modules/highgui/src/backend.cpp (120) createDefaultUIBackend UI: Initializing backend...
[DEBUG:0@0.348] global /home/enerzai/opencv/modules/highgui/src/registry.impl.hpp (87) UIBackendRegistry UI: Builtin backends(2): GTK(1000); GTK3(990) + BUILTIN(GTK3)
[DEBUG:0@0.348] global /home/enerzai/opencv/modules/highgui/src/registry.impl.hpp (112) UIBackendRegistry UI: Available backends(2): GTK(1000); GTK3(990) + BUILTIN(GTK3)
[ INFO:0@0.348] global /home/enerzai/opencv/modules/highgui/src/registry.impl.hpp (114) UIBackendRegistry UI: Enabled backends(2, sorted by priority): GTK(1000); GTK3(990) + BUILTIN(GTK3)
[DEBUG:0@0.349] global /home/enerzai/opencv/modules/highgui/src/backend.cpp (78) createUIBackend UI: trying backend: GTK (priority=1000)
[ INFO:0@0.349] global /home/enerzai/opencv/modules/highgui/src/backend.cpp (90) createUIBackend UI: using backend: GTK (priority=1000)
[ INFO:0@0.349] global /home/enerzai/opencv/modules/highgui/src/window_gtk.cpp (2364) createWindow OpenCV/UI: Creating GTK window: CSI Camera (1)
[ INFO:0@0.516] global /home/enerzai/opencv/modules/highgui/src/window_gtk.cpp (573) CvWindow OpenCV/UI: creating GTK window: CSI Camera
Hit ESC to exit
[DEBUG:0@0.521] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QBUF(3227014671), failIfBusy=1)
[DEBUG:0@0.521] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QBUF(3227014671), ...) => 0 errno=0 (Success)
[DEBUG:0@0.521] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QBUF(3227014671), failIfBusy=1)
[DEBUG:0@0.521] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QBUF(3227014671), ...) => 0 errno=0 (Success)
[DEBUG:0@0.521] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QBUF(3227014671), failIfBusy=1)
[DEBUG:0@0.522] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QBUF(3227014671), ...) => 0 errno=0 (Success)
[DEBUG:0@0.522] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_QBUF(3227014671), failIfBusy=1)
[DEBUG:0@0.522] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_QBUF(3227014671), ...) => 0 errno=0 (Success)
[DEBUG:0@0.522] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_STREAMON(1074026002), failIfBusy=1)
[DEBUG:0@1.148] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_STREAMON(1074026002), ...) => -1 errno=16 (Device or resource busy)
[ INFO:0@1.148] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (974) tryIoctl VIDEOIO(V4L2:/dev/video0): ioctl returns with errno=EBUSY
[DEBUG:0@1.148] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (2095) streaming VIDEOIO(V4L2:/dev/video0): failed VIDIOC_STREAMON: errno=16 (Device or resource busy)
Capture read error
[DEBUG:0@1.155] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (955) tryIoctl VIDEOIO(V4L2:/dev/video0): tryIoctl(3, VIDIOC_REQBUFS(3222558216), failIfBusy=1)
[DEBUG:0@1.458] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (963) tryIoctl VIDEOIO(V4L2:/dev/video0): call ioctl(3, VIDIOC_REQBUFS(3222558216), ...) => 0 errno=0 (Success)
[DEBUG:0@1.458] global /home/enerzai/opencv/modules/videoio/src/cap_v4l.cpp (454) closeDevice VIDEOIO(V4L2:/dev/video0): close(3)
[ INFO:0@1.459] global /home/enerzai/opencv/modules/highgui/src/window_gtk.cpp (1273) destroy OpenCV/UI: destroying GTK window: CSI Camera