Running OctoPrint on a Jetson Nano with a CSI Camera

Hi.

I am running OctoPrint on a Jetson Nano. All good sofar, except, I can't get my camera to work...

The Camera model is the Pi Camera V2 connected via CSI.

The problem is that OctoPrint won't find the camera stream.

I tried countless variations to call gstreamer and managed to get a rtp-stream working. However, Octopront won't read it. I also (believe that...) I got a http-MJPEG-stream working, however Octoprint won't read it either (neither does VLC btw...).

I ended up with the following command:

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=21/1, format=NV12’ ! nvvidconv flip-method=2 ! nvjpegenc ! hlssink playlist-root=http://192.168.3.4:1234

The ip-address is the local address of my Jetson. Gstreamer appears to actually start the stream without errors. Here’s the log:

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: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

However, testing in OctoPrint: No dice.

This is obviously not an OctoPrint issue but I still though someone here could have an idea how to get this working...

Cheers
Florian