-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taking snapshot results in small, damaged JPEG #3
Comments
I'll look into it |
My own camera went awol so I can't test here. Could you please install the module from temporary branch issue3 and see if it works?
|
Unfortunately that didn't work for me. I noticed in the snapshot() method that you're using fs.writeFile(). Right now, I'm accessing my Foscams by direct http requests to the cameras, and I see the same truncated/corrupt file issue when using fs.writeFile(). When using the node 'request' module for my requests, and using fs.createWriteStream() in the code below, it saves the image correctly. Could that fs.writeFile() be the problem here, as well?
|
I'll check it out |
I found the problem, Can you please retry? |
Yes that should work |
OK, installing from the same... |
hmz 😢 |
Bummer! It must be something related to this model of Foscam. Using the code below, the rotation doesn't occur either:
|
What do you get when you open the 345 bytes file in a plain text editor? |
|
Ah that explains a lot. |
Yep, emailing now. |
I have a Foscam FI9831W which appears to function well, as I can login and changes settings, check the live feed of it at 720p. The library loads fine in my NodeJS application, but the snapshot() method takes a picture and saves it as a JPEG with 344 bytes that's damaged or truncated and can't be opened.
The text was updated successfully, but these errors were encountered: