CSI camera not seen by browser

The camera is present:

$ v4l2-ctl --list-devices
vi-output, imx219 6-0010 (platform:54080000.vi:0):
	/dev/video0

However, this html when served locally or remotely

<!doctype html>
<html>
  <head>
    <script>
    
navigator.mediaDevices.enumerateDevices()
  .then(function(devices) {
      devices.forEach(function(device) {
          console.log(device.kind + ": " + device.label +" id = " + device.deviceId);
      });
  })
  .catch(function(err) {
      console.log(err.name + ": " + err.message);
});
    </script>
   </head>
  <body style="margin: 0; overflow: hidden;">
 
  </body>
</html>

shows this in the console:

(index):9 audioinput: Default id = default
(index):9 audioinput: Built-in Audio Analog Stereo id = 0068bb114c85cf3c888bf91db03836ee77229f26e4a3e662bd26f2f699f48962
(index):9 audiooutput: Default id = default
(index):9 audiooutput: Built-in Audio Digital Stereo (HDMI) id = 8edc1f01559c270f05b1a07d55428d00e3529eb1fb87d15874411be92068c581
(index):9 audiooutput: Built-in Audio Analog Stereo id = 0607040b3dd91a27307cc71d5eb2f45d9d924c453e35e8498a6f0feb676a1952

the browser cannot see the camera.

Plugging in a usb webcam shows two cameras:

$ v4l2-ctl --list-devices
vi-output, imx219 6-0010 (platform:54080000.vi:0):
	/dev/video0

HD Webcam C615 (usb-70090000.xusb-2.1):
	/dev/video1

and the html above reveals

udioinput: Default id = default
(index):9 audioinput: Built-in Audio Analog Stereo id = 0068bb114c85cf3c888bf91db03836ee77229f26e4a3e662bd26f2f699f48962
(index):9 audioinput: HD Webcam C615 Analog Mono id = fc89bc754ab720f208eb15003ec57a37a01914da5a15abed9bc008d6e1c80e06
(index):9 videoinput: HD Webcam C615 (046d:082c) id = 293d6ffe7af3f1d03bbd157831358e5570f4eb1c279b39d4bece423a1f6c197e
(index):9 audiooutput: Default id = default
(index):9 audiooutput: Built-in Audio Digital Stereo (HDMI) id = 8edc1f01559c270f05b1a07d55428d00e3529eb1fb87d15874411be92068c581
(index):9 audiooutput: Built-in Audio Analog Stereo id = 0607040b3dd91a27307cc71d5eb2f45d9d924c453e35e8498a6f0feb676a1952

The usb webcam is seen by the browser.

The reason I would like to have the browser see the CSI camera is so I can work on video detected by multiple jetson nanos. Imagine multiple robots each showing what their camera sees. The advantage of doing this in javascript is that the html and javascript can be managed centrally. The code is served, the jetson goes to the webpage serving the code, then the jetson displays what it sees. Adding a usb webcam adds to the size, the weight and power consumption , significantly.

This issue has confounded other Jetson developers:

Can this be solved?

1 Like

hello bwana,

AFAIK, browser only support to access camera stream with v4l2 standard I/O controls.
according to Camera Architecture Stack, that’s v4l2src to communicate with USB camera directly; IMX219, which is one of bayer sensor types, (i.e. CSI camera sensor). it only support with the path going through [Camera Core] block to handle demosaic and other image process.

you may enable v4l2loopback to sink your IMX219 camera streams to one of linux video node, (i.e. /dev/video2)
after that, you should able to enable browser to view the frame via /dev/video2 for usage.
thanks

1 Like