Hi All, I have now got my Raspberry Pi running OctoPrint and connected it to my printer with the standard RPi camera using parts I've printed. Note that the OctoPrint upgrade from BigBox comes with an improved RPi camera. The standard camera settings in OctoPrint don't look the best and can be changed: This document is the official RPi Cam manual that explains the possible camera configuration options: https://www.raspberrypi.org/wp-content/uploads/2013/07/RaspiCam-Documentation.pdf This is the OctoPrint file we are going to modify: https://github.com/guysoft/OctoPi/blob/devel/src/filesystem/home/root/bin/webcamd And these are the possible settings - the image is actually sourced from MJPG-streamer: https://github.com/foosel/OctoPrint/wiki/MJPG-Streamer-configuration Simply: 1. SSH to your RPi using a tool like Putty with username//password of pi//raspbery. 2. Then do: Code: cd /root/bin sudo nano webcamd 3. Then find the following (line 10): Code: camera_raspi_options="-fps 10" 4. I've changed mine to: Code: camera_raspi_options="-fps 10 -awb off -sh 50 -ex auto -quality 100" 5. Press Ctrl + O, Enter to save and then Ctrl + X to exit 6. Reboot with: Code: sudo reboot You should now see an improved picture. Experiment and see what works for you! Note: I tried increasing the resolution using -w 1280 -h 720 and it didn't work :/
Next up - the timelapse videos that OctoPrint can produce have an OctoPrint watermark over them. If, like me, you want to remove this then: 1. Open the OctoPrint config file: Code: cd ~/.octoprint/ sudo nano config.yaml 2. Find the "webcam:" section towards the bottom of the file and you should see something like: Code: ffmpeg: /usr/bin/avconv snapshot:...... 3. Add the watermark option and set it to false: Code: ffmpeg: /usr/bin/avconv watermark: false snapshot:...... 4. Save the file with Ctrl + O, Enter and Ctrl + X to exit nano 5. Restart OctoPrint (from the UI is easiest)[/CODE]
@PsyVision, I haven't tweaked mine yet as per your settings above, but there may be a difference in default settings from the nightly I took in order to get the Pi3 working. Here's what I get from <ip>:8080/static_simple.html Does this look like some tuned with your settings or not to you?
I've also now upped it to 1920 x 1200 and, in addition, fitted the focus ring and dialled in the focus to the center of the bed. Will post some results when I have them.
According to the specs of the cam it can 1080p30 as video, since 10 fps is enough you can go a bit further I think. But that's way too much if you plan to make time-lapse videos. Once I killed a print in the middle because the SD card was full... Then I switched to the solution I described in another post, mounting a share on my NAS and use this for all the files of the OctoPI...
For a robotics project I did, I refocused the Pi camera all the time, and you can really dial it in. I was doing macro work (could focus down to about 2cm) just takes a steady hand. Once you get it dialed in can rift a tad with a lot of vibration if you don't tack it in some way.
OK. So.... Pi3 capturing screenshots at 1920x1080. Everything stored on NAS now as it goes. Focus rung about as good as I can get it. Sometimes it all still looks a bit blurred due to machine vibrations. https://www.youtube.com/watch?v=aJ0fMSrNXJ4 Oh, also I changed the settings so it wasn't quite so crazy a pace. Actually, no, I see messing around with config.yaml has yet again returned me to the original 25,10,10. I think 10,10,10 might be a bit less crazy.
@PsyVision Just checking before I perform this when I get home this afternoon... In Step 4 of your original post change the code to the following: camera_raspi_options="-fps 10 -x 1280 -y 720" I want HD quality, but 720 is sufficient for me. Also, the watermark can be turned on and off from the OctoPrint Webcam Settings window.
Correct on your camera_raspi_options. Didn't know about the watermark option, not sure how I didn't spot that. New in the new version of OctoPrint?
@JohnEsc when you take a set of pictures and turn them into a picture, you typically don't store a perfect copy of every picture for each of the frames in the video. Those pictures are compressed in some way. The more you compress, the more information you lose. So, a higher bitrate will make less of a sacrifice in quality. Run yourself a few tests if you want to see what happens. Just print some tiny objects and use bitrates of say, 2000, 5000, 8000, 11000 and see what you get. I chose 12600 after a little research on Google. One thing is certain though. If you up the size of each image, you will want a higher bitrate. TO go from 640x480 to 1280x720 is to increase the total size of each picture considerably.
Highly recommend you also consider dialing in the focus. There's a slight risk involved allegedly, but I didn't have any issue. I printed this and glued it to the focus ring: http://www.thingiverse.com/thing:211641 To dial in the focus, I placed an item at the center of the bed with relatively small text and then tweaked the focus ring until it was sharp. It really was quite a way off by default.
I've done it many, many times (not on the printer, on other projects) and never had an issue. Just don't treat it like a bulletproof Canon L-series lens which you can abuse, it's a flimsy delicate thing...
Hopefully someone can help me out... since making the change to 1280 x 720, with the following: camera_raspi_options="-fps 10 -x 1280 -y 720" I have had 4 out of 6 timelapse videos not finish processing properly. When completed the videos are showing up as Zero bytes and the files don't open. I can not tell what the difference is with the two timelapse vids that created successfully. Help... I love this feature.