Open hobbeshunter opened 1 year ago
Hi hobbeshunter, guvcview and nvgstcapture-1.0 are not tested and therefore not supported. Please use gst-launch-1.0 to use gstreamer:
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),framerate=20/1' ! autovideosink
I can't see any errors in your device tree file.
Thank you very much. That worked!
Follow up newby question: How do I use this with opencv?
I've tried
import cv2
import sys
gst_str = "nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),framerate=20/1' ! appsink"
cap = cv2.VideoCapture(gst_str, cv2.CAP_GSTREAMER)
if not cap.isOpened():
print('Failed to open camera!')
sys.exit()
while(True):
_, img = cap.read()
cv2.imshow("cam", img)
key = cv2.waitKey(10)
without luck. OpenCV version is 3.2.0.
Thanks in advance!
Any tipp on how to do it?
Hi @hobbeshunter I am very busy currently. I try to support you from the 14th.
Some more results from experiments:
When I try
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),framerate=20/1,format=NV12,width=1280,height=800' ! nvvidconv ! 'video/x-raw, format=GRAY8' ! autovideosink
I get following error:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1280 x 800 FR = 120,599999 fps Duration = 8291874 ; Analog Gain range min 0,000000, max 12,000000; Exposure Range min 1000, max 1000000000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1280 H = 800
seconds to Run = 0
Frame Rate = 120,599999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.507162580
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL ...
Freeing pipeline ...
Hi,
I have two OV9281 EK0033311 V1.0 from you which I wanted to connect to my Jetson Nano B01 dev board. However when I try to use them with gstreamer it fails. I've tried L4T versions 32.6.1 and 32.7.2.
My device tree file is:
``` /* * Copyright (c) 2020-2021, Vision Components GmbH. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, seeAfter setting
guvcview gives:
Show log
``` Opening in O_NONBLOCKING MODE libv4l2: error getting capabilities: Inappropriate ioctl for device V4L2_CORE: ERROR opening V4L2 interface for /dev/v4l-subdev0 Opening in O_NONBLOCKING MODE libv4l2: error getting capabilities: Inappropriate ioctl for device V4L2_CORE: ERROR opening V4L2 interface for /dev/v4l-subdev1 Opening in O_NONBLOCKING MODE libv4l2: error getting capabilities: Inappropriate ioctl for device V4L2_CORE: ERROR opening V4L2 interface for /dev/v4l-subdev2 Opening in O_NONBLOCKING MODE libv4l2: error getting capabilities: Inappropriate ioctl for device V4L2_CORE: ERROR opening V4L2 interface for /dev/v4l-subdev3 Opening in BLOCKING MODE Available Sensor modes : Resolution: 1280 x 800 ; Framerate = 120.599999; Analog Gain Range Min 0.000000, Max 12.000000, Exposure Range Min 1000, Max 1000000000 V4L2_CORE: Unable to find parent usb device.Opening in BLOCKING MODE Available Sensor modes : Resolution: 1280 x 800 ; Framerate = 120.599999; Analog Gain Range Min 0.000000, Max 12.000000, Exposure Range Min 1000, Max 1000000000 V4L2_CORE: Unable to find parent usb device.GUVCVIEW: version 2.0.5 GUVCVIEW: couldn't open /home/Running nvgstcapture-1.0 gives:
Show log
``` $ nvgstcapture-1.0 --camsrc=0 --cap-dev-node=0 Encoder null, cannot set bitrate! Encoder Profile = High Runtime USB Camera Commands: Help : 'h' Quit : 'q' Set Capture Mode: mo:Have I forgotten some setting?