Camera MIPI > V4l2 issue

Hello friends,

I have mipi cameras. csi installed and when i use the command gst-launch-1… it works.

how do i edit this code so it can work? Now i just get a frame filled with green color.
# initialize the video stream and allow the camera sensor to warm up
print("[INFO] starting video stream…")
vs = VideoStream(src=0).start()

V4l2 shows 3 cams where source 2 is the usb cam… and this one works … the 0 and 1 show green frame when used.

maybe in wrong section posted it shuld be in jetson nano tegra x1

Moving to TX1 Forum.

Have reference to below doc to verify the sensor driver first.

its dual camera … Mipi sensor 0 and 1… when i set sensor 0 as vs = VideoStream(src=0).start() the videoframe loads but all i get is green pixeled frame. Same with vs = VideoStream(src=1).start().

When i plug the usb cam it comes on 2 so i use vs = VideoStream(src=2).start(). That works.
I have no idea what im doing wrong since like i said when i use the gst-launch-1… command sensor 0 and 1 work just fine. only in the script its faulty…

What’s the gst-launch-1.0 command? with nvarguscamerasrc?
If gst-launch-1.0 nvarguscamerasrc working well that tell the VideoStream didn’t run the nvarguscamerasrc instead of the v4l2src, that could be the root cause. You may need to modify the VideoStream to for the nvarguscamerasrc as source instead of v4l2src.

indeed nvargus. I cant seem to figure out how to do that since the script uses imutils it refers to
from import VideoStream
Then i check videostream

import the necessary packages

from .webcamvideostream import WebcamVideoStream

class VideoStream:
def init(self, src=0, usePiCamera=False, resolution=(1280, 720),
framerate=10, **kwargs):
# check to see if the picamera module should be used
if usePiCamera:
# only import the picamera packages unless we are
# explicity told to do so – this helps remove the
# requirement of picamera[array] from desktops or
# laptops that still want to use the imutils package
from .pivideostream import PiVideoStream

		# initialize the picamera stream and allow the camera
		# sensor to warmup = PiVideoStream(resolution=resolution,
			framerate=framerate, **kwargs)

	# otherwise, we are using OpenCV so initialize the webcam
	# stream
	else: = WebcamVideoStream(src=src)

def start(self):
	# start the threaded video stream

def update(self):
	# grab the next frame from the stream

def read(self):
	# return the current frame

def stop(self):
	# stop the thread and release any resources

i tryed changing the souce but it didnt work well

Checked Webcamvideo same thing tho … so i dont know how to switch to nvargus :/

PS: Sorry it might be selfexplenatory to most of u but im quite new to this :)

I don’t this could work for NV CSI camera due to the Pi camera framework is totally different with Jetson you can’t just run Pi’s software on Jetson except the webcam due to it is standard UVC driver but CSI camera totally different.