Qs about jetson.utils.gstCamera

Hi,

Since the camera I will be using is GigE camera (BlackFly from FLIR), I couldn’t use the methods specified in tutorial or any guide.

Per manufacturer’s instruction, I was able to install Aravis GStreamer - https://github.com/AravisProject/aravis

I was able to stream it with -
gst-launch-1.0 aravissrc ! video/x-raw, width=960, height=720, framerate=10/1 ! videoconvert ! xvimagesink

My Qs is -
It seems like gstCamera is using GStreamer to stream video and run inference on (could be wrong but…). And I wanted to see if there is a way for me to point jetson.utils.gstCamera to the command above.

Referencing these made me think it might be possible, but please let me know if I am way off… -

Thanks
Jae

Hi,
You may customize gstCamera.cpp to run your source. This should be do-able.

Or you can try DeepStream SDK:


A user has shared experience:

You may try this.

@Honey_Patouceul

Thanks for sharing the post. I read that one as well, but maybe I didn’t understand it 100%.
So, I can actually do what [barzanhayati] did as well. I can use gst-launch-1.0 from terminal to stream but what I want to do is replace the source within detectnet-camera.py so I can use this specific camera. Which, I don’t think was discussed in the post you shared. Or did I miss that part?

I also found your response to this post - IP camera RSTP using with Jetson Nano.

Could I possibly do the same thing with my command - aravissrc ! video/x-raw, width=960, height=720, framerate=10/1 ! videoconvert ! xvimagesink ?

I am using Python, and I have 0 understanding of C++, so I may be missing something here too.

Thanks

@DaneLLL
Thanks for the info. Should I modify this file?

Jetson camera utils expects either a CSI camera (NVCAMERA) or a USB camera (V4L2SRC). If the provided pipeline starts with something else it fails. My dirty patch allows, if CSI and USB camera source is not found, to try a generic gstreamer pipeline instead of failing. It would end with :

video/x-raw, format=BGRx, width=640, height=480 

that is further transformed into RGB by jetson-utils.

So, for your case:

  • Apply the patch from an unmodified version of jetson-utils.
  • Build (make) and install (sudo make install) jetson-utils.
  • Then from your python code such as detectnet-camera.py you would use a custom pipeline such as:
camera = jetson.utils.gstCamera("aravissrc ! video/x-raw, width=960, height=720, framerate=10/1 ! videoconvert ! video/x-raw, format=BGRx, width=640, height=480")

#or 
camera = jetson.utils.gstCamera("aravissrc ! video/x-raw, width=960, height=720, framerate=10/1 ! videoconvert ! video/x-raw, format=RGB, width=640, height=480")

This might not be the optimal pipeline, but this could work out. Let us know.

2 Likes