Open S4WRXTTCS opened 3 years ago
You could try something like this:
SENSOR_ID = 0 # 0 for CAM0 and 1 for CAM1 ports
FRAMERATE = 2 # Framerate can go from 2 to 30 for 4032x3040 mode
NUMBER_OF_PICTURES = 1
options = f"-e nvarguscamerasrc num-buffers={NUMBER_OF_PICTURES} sensor-id={SENSOR_ID} ! \"video/x-raw(memory:NVMM),width=4032,height=3040,framerate={FRAMERATE}/1\" ! nvjpegenc ! multifilesink"
_cmd = f"gst-launch-1.0 {options} location=capture.jpeg"
process = subprocess.Popen(_cmd, shell=True)
process.wait()
I'm unable to find example code that works cleanly on the Jetson Nano using Jetpack 4.5.1
I installed the drivers on 3 different Jetson Nano's with Arducam IMX477's, and they all worked fine using gst-launch-1.0 nvarguscamerasrc sensor-id=$SENSOR_ID ! "video/x-raw(memory:NVMM),width=1920,height=1080,framerate=$FRAMERATE/1" ! nvvidconv ! nvoverlaysink
But, I can't seem to find any Python example code that works.
The following python code has a lot more latency than the previous command line. https://www.arducam.com/docs/camera-for-jetson-nano/native-jetson-cameras-imx219-imx477/python-example/
When I exit this code it gives me a segmentation fault.
I then tried the code in the jetsohacknano github repository which this originally came from, and it gives a segmentation error as well.