node-raspicam icon indicating copy to clipboard operation
node-raspicam copied to clipboard

Not getting photo

Open ScottChapman opened this issue 7 years ago • 4 comments

Here is my code. I've tried being specific about path to file, pausing between start/stop. Not seeing all the events get fired. It does give me the command it is going to run, which when I run in CLI I get the image I want:

var Raspicam = require('raspicam');


var camera = new Raspicam({
	mode: "photo", 
	verbose: true,
	timeout: 0,
	output: "/home/pi/Camera/picture.jpg"
});


camera.start();
console.log("about to wait...");
setTimeout(function() {
	console.log("done waiting");
	camera.stop();
}, 10000);


camera.on("read", function(err,timestamp,filename) {
	console.dir(err);
	console.dir(timestamp);
	console.log(filename);
});


camera.on("start", function() {
	console.log("Started!");
});


camera.on("exit", function() {
	console.log("Done!");
});

ScottChapman avatar Jun 18 '17 15:06 ScottChapman

I'm facing the same issue. Code is same except for the path. Did you manage to resolve it?

rajivvishwa avatar Jul 26 '17 00:07 rajivvishwa

Have you folks enabled the camera from raspi-config?

unknowndomain avatar Aug 17 '17 14:08 unknowndomain

My rpi camera module is enabled. This is the output when running my script. No errors as far as I can see, but no file showing up in the folder. Any tips?

calling.... /opt/vc/bin/raspistill --verbose --output /home/pi/Pictures/hei.jpg --width 640 --height 480 stderr: raspistill Camera App v1.3.8

Width 640, Height 480, quality 85, filename /home/pi/Pictures/hei.jpg Time delay 5000, Raw no Thumbnail enabled Yes, width 64, height 48, quality 35 Link to latest frame enabled no Full resolution preview No Capture method : Single capture

Preview Yes, Full screen Yes Preview window 0,0,1024,768 Opacity 255 Sharpness 0, Contrast 0, Brightness 50 Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0 Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none' Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128 Rotation 0, hflip No, vflip No ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000

[1] Done leafpad index.js (wd: ~/node_programs/liveStreaming) (wd now: ~/node_programs/raspicam) [2]- Done leafpad index.html (wd: ~/node_programs/liveStreaming) (wd now: ~/node_programs/raspicam)

mskogly avatar Aug 21 '17 12:08 mskogly

It doesn't appear to be saving, maybe the output folder isn't writable?

unknowndomain avatar Aug 24 '17 10:08 unknowndomain