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
Follow this topic

by warren | December 05, 2017 17:43 | #15301


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:



2 Comments

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!

Reply to this comment...


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

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Log in to comment