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.
    • resamundefined
      resam
      last edited by

      Hi all,

      I wrote a little tool that allows me to create timelapse videos with pictures on every layer change, using a Duet controller, a Telnet connection from a Raspberry Pi (or other PC), and a webcam (to get still pictures over a URL):

      https://github.com/kriechi/DuetRRF-timelapse
      (see the README for more information)

      Feel free to ask questions or post feature requests!
      I hope somebody finds it useful!

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 10
      • T3P3Tonyundefined
        T3P3Tony administrators @resam
        last edited by

        @resam awesome!

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          This is great. Can't wait to give it a try. I miss timelapses.

          Z-Bot CoreXY Build | Thingiverse Profile

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

            Fantastic.

            Now, we need to integrate this with the other "Proxy/Camera" Pi work that is going on, and produce a pre-built image.

            Delta / Kossel printer fanatic

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

              If there is enough interest, I can make it a pip package, so it is easier to install and update. For now it still requires some manual setup and configuration.

              1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator @Danal
                last edited by

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

                Fantastic.

                Now, we need to integrate this with the other "Proxy/Camera" Pi work that is going on, and produce a pre-built image.

                My thoughts exactly.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • Railgunner13fundefined
                  Railgunner13f
                  last edited by

                  What is a good way to set up a USB webcam to return snapshot pictures (still image) via an URL? I tried this link and it seemed to install fine. But I'm not getting an image with http://127.0.0.1:8080/?action=snapshot in the raspberry browser.

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

                    I'm also using mjpg-streamer - there should be a bunch of different guides and how-tos out there, even specific ones for Raspberry Pi or other Linux devices.

                    @Railgunner13f the link you posted does not configure it as HTTP webcam, but uses port 9000 for streaming with a different protocol. Try this instead: https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-|-MJPEG-Streamer-Install-&-Setup-&-FFMpeg-Recording (only the top part).

                    1 Reply Last reply Reply Quote 1
                    • Railgunner13fundefined
                      Railgunner13f
                      last edited by

                      Bingo!
                      I am finally capturing the stills!
                      Where do I send the beer!

                      1 Reply Last reply Reply Quote 1
                      • Phaedruxundefined
                        Phaedrux Moderator
                        last edited by

                        Would you be able to post an example timelapse?

                        Z-Bot CoreXY Build | Thingiverse Profile

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

                          https://www.dropbox.com/s/2ti52rimgepaq7e/2018-07-01-eggs-abs.mp4?dl=0
                          and
                          https://www.dropbox.com/s/z4az144426w9icp/2018-04-05-Einstein-bust.mp4?dl=0

                          1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator
                            last edited by

                            That's great. Exactly what I was hoping for. Hopefully I can find some time to get it setup soon.

                            Z-Bot CoreXY Build | Thingiverse Profile

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

                              @Phaedrux let me know how the mjpg-streamer stuff works for you. I'm thinking about removing this dependency and implementing a simple frame-grabber with OpenCV in Python directly... This means the webcam can't be used for Octoprint or other tools easily, but if people only want timelapses, thats fine.

                              Phaedruxundefined Danalundefined 2 Replies Last reply Reply Quote 1
                              • Phaedruxundefined
                                Phaedrux Moderator @resam
                                last edited by

                                @resam Will do. I'm thinking I will pick up another RPi3 to run this on. Or do you think a RPiZeroW with camera module would be good enough? I currently use MotionOS on the zero to act as an IP cam.

                                Z-Bot CoreXY Build | Thingiverse Profile

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

                                  I'm running this on a RPiZeroW - good enough for 15fps streaming of 1280x720p and the snapshots with my script.

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

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

                                    I'm thinking about removing this dependency and implementing a simple frame-grabber with OpenCV in Python directly... This means the webcam can't be used for Octoprint or other tools easily, but if people only want timelapses, thats fine.

                                    Would this affect the ability to have the camera visible and updating in Duet Web Control?

                                    Delta / Kossel printer fanatic

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

                                      @Danal yes - in that case the "access to the webcam" is exclusive. Either timelapse snapshots or DWC/Octoprint/some other streaming.

                                      There might be a way around it, but it involves a more complex Linux setup - which I want to avoid. I can make it optional: "quickstart = exclusive timelapse snapshot" and as second option, the existing mjpg-streamer integration via a URL.

                                      Let me know how many of you want to keep DWC/Octoprint webcam access, and how many ONLY want to use timelapse snapshots.

                                      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                                      • T3P3Tonyundefined
                                        T3P3Tony administrators @resam
                                        last edited by

                                        @resam would it be possible to serve those timelapse shots (or rather the latest one) to DWC? For remote monitoring it gives a once per layer update.

                                        www.duet3d.com

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

                                          @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?)

                                          T3P3Tonyundefined assasinscreed00undefined 2 Replies Last reply Reply Quote 0
                                          • Danalundefined
                                            Danal
                                            last edited by Danal

                                            Having a camera visible in DWC allows a human to periodically check from their mobile and abort prints that go wrong. And/or have the confidence at hour X that a long print is going right!! They may be checking from the next room, or across town. Timelapse is nifty to document, share, show to non-3D print people, etc. It is most desirable to capture these on the same long prints where remote monitoring is most desirable.

                                            Longwinded way of saying: If we are building an Rpi setup (or image) to provide a camera for Duet/RepRap based printers, it really should do both camera functions, seamlessly.

                                            Blending that with the desirability of a proxy function, the DWC camera view should work on "local network" or "via proxy" equally seamlessly.

                                            Delta / Kossel printer fanatic

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