Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Timelapse pictures & videos with Duet and webcam on layer change

    Scheduled Pinned Locked Moved
    General Discussion
    15
    43
    7.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • assasinscreed00undefined
      assasinscreed00 @resam
      last edited by

      @resam

      @resam said in Timelapse pictures & videos with Duet and webcam on layer change:

      @T3P3Tony probably - but the idea behind using OpenCV and ditching mjpg-streamer was to REDUCE complexity 😄

      For people who want to keep their DWC webcam, you should probably still use mjpg-streamer (unless somebody knows of a similar / better tool?)

      this comment is where I thought you said it, I assume I am reading it wrong?

      1 Reply Last reply Reply Quote 0
      • anironundefined
        aniron
        last edited by aniron

        Is there anything in principle preventing this from working on the older Duets, like the 0.6?

        Danalundefined 1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal @aniron
          last edited by

          @aniron said in Timelapse pictures & videos with Duet and webcam on layer change:

          Is there anything in principle preventing this from working on the older Duets, like the 0.6?

          Could you restate what "this" is? Lots of things discussed above... 🙂

          Delta / Kossel printer fanatic

          anironundefined 1 Reply Last reply Reply Quote 0
          • anironundefined
            aniron @Danal
            last edited by

            @Danal sorry, I was referring to the OP. Didn't realise how old it was.

            "Requirements
            DuetWifi or Duet Ethernet or Duet 2 Maestro controlled printer
            RepRapFirmware v1.21 or v2.0 or higher"

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by Danal

              Ah, got it. OP will need to answer.

              I've been intentionally not "stepping on toes" because both @resam and I have tools that do lapse-to-video. Each has its strengths and weaknesses.

              But I will mention mine... The one linked below "duetLapse" should be able to interact with any Firmware V2 or V3. It was developed to run on a Pi, but could potentially run anywhere that Python runs. It only needs to be able to open the camera, and to reach the printer via network.

              https://github.com/DanalEstes/DuetLapse

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • resamundefined
                resam
                last edited by

                I don't see any specific reason why it should not work on a Duet 0.6 - as long as it runs RRF 1.21 or later and has Telnet active.

                1 Reply Last reply Reply Quote 0
                • Damienundefined
                  Damien
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • Damienundefined
                    Damien
                    last edited by Damien

                    Hi all,

                    Finally got a Raspberry Pi 4B, have it setup sand installed and working with Duet RFF Timeplase. I've got the Pi taking pics of the print on layer change.

                    My question is regarding the layer change script. How should I add a line to the script to tell the print head to move to a specified place before each pic, without messing up the core programming?

                    Thanks in advance!!

                    mrehorstdmdundefined 1 Reply Last reply Reply Quote 0
                    • mrehorstdmdundefined
                      mrehorstdmd @Damien
                      last edited by

                      @Damien I have modified my set up to sync with layer change- it requires no wiring or hacks other than adding a little custom g-code on layer change. I use a bluetooth button to trigger the cell phone camera.

                      The custom g-code is in the printer profile tab of the slicer, so I made a layer sync specific printer profile. When I want to make layer synced video, I use that profile when I slice, otherwise I use a normal profile.

                      layer synchronized time lapse in the making

                      layer synchronized time lapse

                      https://drmrehorst.blogspot.com/

                      1 Reply Last reply Reply Quote 0
                      • Hugo Hiaslundefined
                        Hugo Hiasl
                        last edited by Hugo Hiasl

                        Hi everybody,

                        is that solution able to do both? Stream a video to the DUET3D web front end to check if the print is still working as expected AND creating time lapse (time based or on layer change) at the same print in parallel?

                        Or is it only for making time lapse?

                        My plan ist to get a raspberry pi (3, 4 or zero) in combination with a logitech HD920 cam.

                        wilrikerundefined 1 Reply Last reply Reply Quote 0
                        • wilrikerundefined
                          wilriker @Hugo Hiasl
                          last edited by

                          @Hugo-Hiasl This mainly depends on the software you use to provide the stream. Some of these will allow you to have a continuous video stream that will just be paused for a second to take a snapshot image. I think both mjpg-streamer and uStreamer support this. But I have never tried it.

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          etrigan63undefined EasyTargetundefined 2 Replies Last reply Reply Quote 0
                          • etrigan63undefined
                            etrigan63 @wilriker
                            last edited by

                            @wilriker Keepalive post.

                            In answer to your question, yes mjpeg-streamer can be used this way and it is how the octolapseplugin works in octoprint. I have a Vivedino Troodon (Voron-clone) and it's clone Duet2 Wifi card is so good it has the same issues with Octoprint that the OEM board suffers.

                            Carlos Echenique
                            3D Printers Guru

                            1 Reply Last reply Reply Quote 0
                            • EasyTargetundefined
                              EasyTarget @wilriker
                              last edited by

                              @wilriker
                              I cant speak for ustreamer but mjpeg-streamer provides a http stream on http://<ip:port>/?action=stream and can accept multiple connections. I regularly have it streaming on my desktop and media-pc simultaneously without issues or any noticeable load on the Pi.

                              OctoPrint's inbuilt timelapse system, (or octolapse , if you love needless complexity) requests snapshots via http://<ip:port>/?action=snapshot, there is no detectable pause on the streams when this is invoked.

                              Conventionally: To get a timelapse you use a script to capture frames at set intervals/events, timestamp them if desired and save them. Once the capture is complete you stitch them together using ffmpeg.

                              However.. when I want a timelapse on my CNC I start a screen session (nohup shell) on it's attendant Pi and run this:

                              pi@laserweb:~ $ ffmpeg -r 600 -i http://localhost:8080/?action=stream  -vf "drawtext=fontcolor=white:fontsize=16:box=1:boxcolor=black@0.3:x=(w-text_w-10):y=(h-text_h-5):expansion=strftime::text='CNC \:\ %H\:%M\:%S'" -r 20 lapse.`date +%Y%m%d%H%M%S`.avi
                              

                              Which tricks ffmpeginto thinking that my 30fps stream is really a 600fps stream, and the asks it to timestamp that and convert to a 20fps framerate.
                              The end result is a 20x speedup video with timestamp, but the quality is noticeably lower than the capture/assemble method. And the Pi3 is devoting 32->40% of it's CPU to ffmpeg while it is running. Not recommended as a permanent solution, it's a classic quick'n'dirty one liner.

                              Disaster? The original Printeye is dying with RRF 3.5 (M208 depreciated).
                              PrintPy2024 to the rescue!
                              MicroPython based; with simple wiring and and no custom PCB.

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA