I have CSI camera on my Jetson TX2 (e-CAM21_CUTX2)

What is the underlinging process to get the driver onboard (Jetson Tx2 ) to access the camera feed (e-CAM21_CUTX2) from with gstreamer to the Node.js application.

I have the process down with out the cloud solution. As for now, I want to scale the deployment, Hence I am here.

Hi @shams3049,

Maybe this Dockerfile is helpful as an example to extract the firmwares, drivers and pre-built gstreamer libraries with elements inside a container running Ubuntu 16.04.

Not sure about your exact use-case and I also don’t have the camera, but the example may help you get started as it loads the gstreamer camera plugin and you can run gstreamer pipelines with elements that use hw acceleration from the drivers package.

gst-inspect-1.0 nvcamerasrc
...
   Factory Details:
   Rank                     primary (256)
   Klass                    Video/Capture
...
Plugin Details:
   Name                     nvcamera
   Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcamera.so
   Version                  1.2.0
   License                  Proprietary
   Source module            nvcamera
   Binary package           NvCamera

I have a node.Js application with darknet (YOLO). The idea is to feedin in gsstream into the app and sinkback the detected object as Json to persist on mangoDB.

What I am not able to understand is how do I load the drivers for the camera (as mentioned above) to load so the gsstreamer can interface with the camera. or am I completly off in understanding the architeture here!

Hi @shams3049

Drivers are present either as built-in into the kernel or as modules in the hostOS, whereas gstreamer with libraries and plugins, nodejs and other application components reside in the container, as you see in the Dockerfile example.

Now, I’ve looked into the documentation provided by the company that produces this camera and it looks like they provide a customized pre-built ubuntu image to be flashed on the TX2 that contains a customized device tree, specific binaries & libraries as well as a patched kernel with a different defconfig to have the camera running. This software bundle is provided along with the camera on an sd-card.

Since kernel changes are necessary to have this type of camera running with balenaOS, you can build your own image from sources in which you patch the kernel with the patches provided by the camera vendor in the camera software release bundle. You then flash the TX2 with this resulting image and unpack the camera vendor provided BSP archive inside the container, just like in the Dockerfile example I provided for you.