Question: How can we stream video to SpectralWorkbench.org or Infragram.org from a Raspberry Pi camera?

warren is asking a question about raspberry-pi: Subscribe to answer questions on this topic

warren asked on December 05, 2017 17:43
172 | 1 answers | shortlink


This is a key part of ease of use with Raspberry Pi based spectrometers, and also Infragram use with Raspberry Pi cameras:

Read more at:

Would love to modify both these pieces of software to be able to stream from a Rasberry Pi on a local network, or even on the same device. The relevant code sections are:



spectrometry raspberry-pi infragram raspberry-pi-infragram raspberry-pi-spectrometer

question:raspberry-pi question:infragram-challenges question:raspberry-pi-infragram question:raspberry-pi-spectrometer question:coding question:lego-spectrometer



1 Comments

warren 6 months ago

There's some really good starting code here: https://www.sitepoint.com/streaming-a-raspberry-pi-camera-into-vr-with-javascript/

Please help out if you can!

Log in to comment

1 Answers

Looks like you can just load it as an image using this code, and insert it:

      var piImage = new Image();

      piImage.onload = function() {
        context.drawImage(piImage, 0, 0, canvas.width, canvas.height);
      }

      piImage.src = "http://raspberry.local/cam_pic.php?time=" + new Date().getTime();

But we'll need to set up CORS permissions on the Pi to do this from SpectralWorkbench.org or Infragram.org, unless we run a version of that code on the Pi itself: https://enable-cors.org


Log in to comment

Sign up or Login to post an answer to this question.