nvarguscamerasrc vs nvcamerasrc usage Python and OpenCV 3.4.0

I understand from other threads that ‘nvcamerasrc’ is deprecated for ‘nvarguscamerasrc’.

However, ‘nvcamerasrc’ currently works in my implementation, however, swapping it out for ‘nvarguscamerasrc’ gives me errors.

Any advice on what am I doing wrong with the following:

gst_str = ('nvarguscamerasrc sensor-id=0 ! '
	#gst_str = ('nvcamerasrc sensor-id=0 ! '
		'video/x-raw(memory:NVMM), '
		'width=(int)2592, height=(int)1458, '
		'format=(string)I420, framerate=(fraction)30/1 ! '
		'nvvidconv ! '
		'video/x-raw, width=(int){}, height=(int){}, '
		'format=(string)BGRx ! '
		'videoconvert ! appsink').format(width, height)
	return cv2.VideoCapture(gst_str, cv2.CAP_GSTREAMER)

The error I receive:
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1 H = 1
seconds to Run = 0
GST_ARGUS: Creating output stream
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:389 Failed to create OutputStream

I’m using Python3 and openCV 3.4.0 with Jetpack 3.3 on a Jetson TX2.

With nvarguscamerasrc, you may try 1920x1080@30fps in NV12 format.

Hi,
nvcamerasrc is deprecated from r31.1. On r28.2.1, it is still working.

Please also try HoneyP’s suggestion.