Camera and timelapse¶
Camera streamer (experimental option)¶
The camera streams with mjpg_streamer by default. ustreamer is available as an experimental alternative. It passes the camera's own MJPEG frames through with almost no CPU, copes better with several viewers or a slow connection, and skips repeated frames when nothing moves.
To switch, edit camera.conf in the config folder (Fluidd or Mainsail: Configuration),
then restart the printer:
Switching to ustreamer needs an internet connection, over Wi-Fi or wired Ethernet: the printer downloads it the first time.
streamer: mjpg_streamer switches back. The camera keeps the same port, addresses
and colour settings, so Fluidd, Mainsail and Timelapse need no changes. If ustreamer
stops three times in a row within 30 seconds of starting, the printer goes back to
mjpg_streamer until the next restart, and says so in /tmp/opencreator.log.
ustreamer's own log is /usr/data/logs/ustreamer.log.
Timelapse¶
The OpenCreator Installer sets up Moonraker Timelapse. It takes a camera frame at every layer change and renders them into an MP4 when the print finishes. The videos show up under Timelapse in Fluidd and Mainsail, where you can also change its settings (frame rate, parking the toolhead for each frame, and so on).
To record a print, add TIMELAPSE_TAKE_FRAME to the slicer's layer change
G-code (see Slicer Configuration). Without it,
only hyperlapse mode records, which takes frames at a fixed interval instead.
| Printer (SoC) | Raspberry Pi (tunnel) | |
|---|---|---|
| Camera | The printer camera, through its snapshot URL | The webcam you set up in Fluidd or Mainsail |
| ffmpeg | FlashForge's own build, already on the printer | Installed from apt |
| Frames | /usr/data/opencreator/timelapse/frames/ |
/tmp/timelapse/ |
| Videos | /usr/data/opencreator/timelapse/ |
~/printer_data/timelapse/ |
Rendering on the printer
On the printer, ffmpeg runs at the lowest priority so it never holds up
Klipper, which makes rendering slow: expect a few minutes for a long print.
Frames are kept on storage rather than in /tmp, which is RAM and too
small for a long print.
Moonraker's update manager keeps Timelapse current, as the timelapse entry.