Jetson Nano CSI camera

I am trying to add a CSI camera stream to the watchman agent on Jetpack 4.2.1 using the Nano developer board. I am able to stream the camera using Nvidia accelerated gstreamer using the following:

gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e

Reading the instructions from openalpr I have done the following:

  1. Edit /etc/openalpr/stream.d/[cameraname].conf
  2. Add gstreamer_format = [your custom gstreamer pipeline]
  3. Remove the “autovideosink” and replace it with “appsink name=sink max-buffers=5”
  4. Make sure you do not include the “gst-launch-1.0” command at the beginning.

I use the following in /etc/openalpr/stream.d/test.conf without success:

gstreamer_format = nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e appsink name=sink max-buffers=5

I believe the last sink part is the issue, I have tried multiple combinations of settings with no success.

Any help greatly appreciated :slight_smile:

For anyone with the same problem or using a CSI camera on a Jetson Nano board, this is how we got it to work.

  1. Edit /etc/openalpr/stream.d/[cameraname].conf
  2. Add stream = blank
  3. Add camera_id = 123
  4. Add gstreamer_format = [your custom gstreamer pipeline]

My gstreamer format was:
nvarguscamerasrc ! video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12 ! nvvidconv flip-method=0 ! video/x-raw,width=960, height=616 ! nvvidconv ! video/x-raw ! videoconvert ! video/x-raw,format=(string)BGR ! videoconvert ! appsink name=sink max-buffers=5

Thanks to Matt worked out we need it to go to CPU memory, remove all ’ and add the stream and camera id or else the agent skips it.