Giter Site home page Giter Site logo

duetlapse's Introduction

DuetLapse

Time Lapse camera support for Duet based 3D printers.

Designed to run on a Raspberry Pi, may be adaptable to other platforms. Supports cameras via USB, Pi (ribbon cable), and Webcam. May support DSLR triggering in the future. Produces a video with H.264 encoding in an MP4 container. Does not, at this time, manage a library of videos, it simply drops the vid in home directory.

Triggers images based on time, layer change, or pause. Works with existing pauses in G-Code, or can force pauses at other trigger events. Optionally moves head to a specified position before capturing paused images.

Status

As of April 14, 2020, moving to Beta test status. I believe the Alpha testers have helped clear out the funadmental issues, thank you for your feedback. As of April 2, 2020, ready for Alpha testing. Feedback via issues on Github or at Duet forum https://forum.duet3d.com/

Status of Features. Unchecked features are planned, coming soon:

Cameras:

  • USB Cam
  • Web Cam
  • Pi Cam
  • DSLR Cam via USB
  • GPIO pin to trigger any kind of camera

Other Features:

  • Detect Layer change
  • Intervals in seconds
  • Detect Pauses
  • Force Pauses
  • Position Head during Pauses
  • Video output in H264 MP4
  • Unique names for Videos
  • Add a timestamp in one corner of vid. Analog or Digital? Or option.
  • While gathering stills, skip frames that cause errors, without terminating entire script.
  • Run in a daemon like status, supporting multiple print jobs, one after another.
  • Allow override of command line switches for still capture programs. (fswebcam, raspistill, wget)
  • Allow override of command line switches for ffmpeg

Installation

Corequisites

  • Python3 (already installed on most Pi images)
  • Duet printer must be RRF V2, RRF V3, or RRF V3 + Pi
  • May run on, but NOT required to run on, the printer's Pi in a RRF V3 + Pi configuration
  • Duet printer must be reachable via network
  • ffmpeg (always)
  • Depending on camera type, one of
    • fswebcam (for USB cameras)
    • raspistill (for Pi cam or Ardu cam)
    • wget (for Web cameras)

Usage

Start the script, usually ./DuetLapse [options], before starting a print. It will connect to the printer and wait for the printer to change status from "Idle" to "Processing" and then begin capturing still images per the flag settings. When the printer then goes "idle" again (i.e. end of print), it will process the still images into a video.

usage: DuetLapse.py [-h] -duet DUET [-camera {usb,pi,web,dslr}]
                    [-seconds SECONDS] [-detect {layer,pause,none}]
                    [-pause {yes,no}] [-movehead MOVEHEAD MOVEHEAD]
                    [-weburl WEBURL] [-dontwait]
                    {camparms,vidparms} ...

Program to create time lapse video from camera pointed at Duet3D based
printer.

optional arguments:
  -h, --help            show this help message and exit
  -duet DUET            Name or IP address of Duet printer.
  -camera {usb,pi,web,dslr}
  -seconds SECONDS
  -detect {layer,pause,none}
  -pause {yes,no}
  -movehead MOVEHEAD MOVEHEAD
  -weburl WEBURL
  -dontwait             Capture images immediately.

subcommands:
  {camparms,vidparms}   DuetLapse camparms -h or vidparms -h for more help

Usage Notes

This script is in rapid development, and runnith ./DuetLapse.py -h is likely to give more recent usage information.

The only required flag is -duet to specify the printer to which the script will connect. If not specified, camera defaults to "USB" and detection defaults to "layer". Example:

./DuetLapse.py -duet 192.168.7.101 

Many options can be combined. For example, the script can trigger on both "seconds" and "detect layer". It will inform you if you select conflicting options.

Example: Use a webcam that requires a UserId and Password, trigger every 30 seconds, do not detect any other triggers:

./DuetLapse.py -camera web -weburl http://userid:[email protected]/cgi-bin/currentpic.cgi -duet 192.168.7.101 -seconds 20 -detect none

Example: Default to USB camera and detecting layer changes, force pauses (at layer change) and move head to X10 Y10 before taking picture.

./DuetLapse.py -duet 192.168.7.101 -pause yes -movehead 10 10

duetlapse's People

Contributors

danalestes avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mgeppert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.