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

    DuetLapse3

    Scheduled Pinned Locked Moved
    Third-party software
    20
    296
    30.7k
    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.
    • stuartofmtundefined
      stuartofmt @osterac
      last edited by

      @osterac said in DuetLapse3:

      @stuartofmt it's a pi 4 with 2 USB webcams. I'll hold off with videostream then.

      Once you get the resolution set correctly (with motioneye) you should be fine.

      I'm working on DuetLapse as a plugin (The DuetLapse code will be common.) . I'll add in the fixed duration option as part of that effort. Fitting it in with other things at the moment - so could be a few weeks . 🤞

      osteracundefined 1 Reply Last reply Reply Quote 0
      • osteracundefined
        osterac @stuartofmt
        last edited by

        @stuartofmt A few weeks isn't long at all! I checked the stream from motioneye by streaming it to VLC and taking a snapshot. It is indeed streaming at 720p regardless of what resolution I set. It's a cheap webcam, so that probably has something to do with it. If I plug it into my PC it will run at 2k, albiet not very well. I may just have to get a better webcam. I really appreciate all your help. Looking forward to that plugin too.

        I have a Logitech c615 streaming a different view of the printer, so I'll probably check to see if the resolution is correct on that one. I would use it for timelapses, but the auto focus is horrible and my other cam has manual focus, which I prefer. Although the auto focus is adjustable via ffmpeg parameters, I haven't been able to get that to work with motioneye.
        It's been nice chatting with you. I'll let you know if anything else comes up.
        Thanks so much!

        stuartofmtundefined 1 Reply Last reply Reply Quote 0
        • stuartofmtundefined
          stuartofmt @T3P3Tony
          last edited by

          @T3P3Tony said in DuetLapse3:

          @stuartofmt Yes they main point from the front end is it brings it into the structure of plugins which ease installation (and potentially discovery by users, once the plugin repository is more used).
          <snip>
          All that said, the most immediate benefit appears to be with a DWC plugin for the UI to ease installation and discovery.

          I looked closely at the practicality of offering a plugin version of DuetLapse3. I received a lot of help from others and did make some progress.

          I've decided to abandon this effort for several reasons:
          a) It would would only work for SBC.
          b) The dependencies in DuetLapse3 inevitably require interactions with the operating system that would not be avoided with a plugin.
          c) I do not have a SBC platform and could not properly test.

          Having said that - I have made some improvements to DuetLapse3 which I will release soon. These including the ability to use a configuration file to set runtime options.

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

            @stuartofmt firstly thanks for your efforts to this point!

            I agree that an SBC would be required (as it is with DuetLapse at all right now). In addition interaction with the OS, where required, is supported by DSF if the user chooses to take that risk with a plugin (arguably no more risk than installing DuetLapse & dependencies as a third party application). We probably need to do better with how we deal with dependencies such as ffmpeg if a plugin needs them and maybe @chrishamm can provide some thoughts about a good way forward. As far as "c" is concerned we value the work that you are doing so would be happy to support you with the Duet and RaspberryPi elements of such a system in the future if the situation changes.

            www.duet3d.com

            stuartofmtundefined chrishammundefined 2 Replies Last reply Reply Quote 1
            • stuartofmtundefined
              stuartofmt @T3P3Tony
              last edited by

              @T3P3Tony said in DuetLapse3:

              @stuartofmt firstly thanks for your efforts to this point!

              I agree that an SBC would be required (as it is with DuetLapse at all right now). In addition interaction with the OS, where required, is supported by DSF if the user chooses to take that risk with a plugin (arguably no more risk than installing DuetLapse & dependencies as a third party application). We probably need to do better with how we deal with dependencies such as ffmpeg if a plugin needs them and maybe @chrishamm can provide some thoughts about a good way forward. As far as "c" is concerned we value the work that you are doing so would be happy to support you with the Duet and RaspberryPi elements of such a system in the future if the situation changes.

              Yes - Its a glass half full / empty situation from my perspective. Some of the dependency management can likely be done by the plugin, although success isn't always guaranteed. In the case of "failure" the fallback is no worse than doing it manually at the OS level. I'll PM you about the possibility of upgrading my controller to one that supports SBC.

              1 Reply Last reply Reply Quote 1
              • chrishammundefined
                chrishamm administrators @T3P3Tony
                last edited by

                @T3P3Tony @stuartofmt The DSF plugin manifest already supports external package dependencies (like ffmpeg in this case). This is the purpose of the optional sbcPackageDependencies array in the plugin manifest (plugin.json). Python/pip dependencies can be specified using the optional sbcPythonDependencies array.

                Duet software engineer

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

                  @chrishamm does specifying the dependencies cause them to be installed, or for the plugin installation to fail if they are not present?

                  www.duet3d.com

                  chrishammundefined 1 Reply Last reply Reply Quote 0
                  • chrishammundefined
                    chrishamm administrators @T3P3Tony
                    last edited by

                    @T3P3Tony The DSF plugin service running as root installs them automatically. If the install process returns a non-zero return code, the plugin installation is aborted.

                    Duet software engineer

                    stuartofmtundefined 1 Reply Last reply Reply Quote 1
                    • stuartofmtundefined
                      stuartofmt @chrishamm
                      last edited by

                      @chrishamm

                      This is good news! To be clear: sbcPythonDependencies attempts a python -m pip install xyz ?

                      Also what's the difference between dfs-python and "regular" python? What python version is it based on ?

                      Proschi3Dundefined Falcounetundefined 2 Replies Last reply Reply Quote 0
                      • stuartofmtundefined stuartofmt referenced this topic
                      • Proschi3Dundefined
                        Proschi3D @stuartofmt
                        last edited by Proschi3D

                        I have a Raspberry Pi 4 and MPEG Streamer installed. Does anyone have clear instructions on how to install Duet laps 3? I can't get it to run 🙈

                        or does anyone know Duet Motion https://www.makeit-3d.de/index.php/de/instrumente/duet-motion-zeitraffer-generator.html

                        Love my Duet 3 Mini.
                        https://www.instagram.com/proschi3d
                        https://youtube.com/@proschi3d
                        https://www.proschi3d.de

                        stuartofmtundefined 1 Reply Last reply Reply Quote 0
                        • Falcounetundefined
                          Falcounet @stuartofmt
                          last edited by Falcounet

                          @stuartofmt said in DuetLapse3:

                          @chrishamm

                          This is good news! To be clear: sbcPythonDependencies attempts a python -m pip install xyz ?

                          Actually, it depends on what you have in your /opt/dsf/conf/plugins.json
                          it uses the commands defined by InstallPythonPackageCommand and with arguments defined by InstallPythonPackageArguments
                          So it does, per default, /usr/bin/pip3 install {package}

                          This means you can specify a specific version of a module if you need to, such as "sbcPythonDependencies": ["dsf-python>=3.4.5"]

                          Also what's the difference between dfs-python and "regular" python? What python version is it based on ?

                          dsf-python is a module, it doesn't replace python and is based on the python version you have installed on your system.
                          At the moment python 3.7 at least is required (that's the version installed on DuetPi image) but should work on higher versions.

                          stuartofmtundefined 1 Reply Last reply Reply Quote 0
                          • stuartofmtundefined
                            stuartofmt @Falcounet
                            last edited by

                            @Falcounet

                            Thanks! I’ll be restarting efforts on a Duetlapse plug-in soon.

                            1 Reply Last reply Reply Quote 0
                            • stuartofmtundefined
                              stuartofmt @Proschi3D
                              last edited by stuartofmt

                              @Proschi78 said in DuetLapse3:

                              Does anyone have clear instructions on how to install Duet laps 3?

                              Have you looked at the documentation here:
                              https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3.md

                              Also this:
                              https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3 Useage Examples.md

                              If you can give some insight into where you are at and what is stopping you from proceeding, we can help.

                              It is relatively straightforward but there are lots of options. Only a few are needed to get started.

                              Proschi3Dundefined 2 Replies Last reply Reply Quote 0
                              • Proschi3Dundefined
                                Proschi3D @stuartofmt
                                last edited by Proschi3D

                                @stuartofmt first of all thank you very much for your offered help. I'll try again later and report back.

                                how can i start Lapse ?

                                pi@RepetierServer:~/Duetlapse $  python3 ./DuetLapse3.py -duet 192.168.178.91 -host 192.168.178.91 -port 8082 -pause yes -movehead 10 10
                                192.168.178.91 MainThread - ################### Options at start of this print job  #####################
                                192.168.178.91 MainThread - # Environment
                                192.168.178.91 MainThread - duet                 192.168.178.91
                                192.168.178.91 MainThread - basedir              /home/pi/Duetlapse
                                192.168.178.91 MainThread - poll                 12
                                192.168.178.91 MainThread - instances            single
                                192.168.178.91 MainThread - logtype              both
                                192.168.178.91 MainThread - nolog                False
                                192.168.178.91 MainThread - verbose              False
                                192.168.178.91 MainThread - host                 192.168.178.91
                                192.168.178.91 MainThread - port                 8082
                                192.168.178.91 MainThread - keeplogs             False
                                192.168.178.91 MainThread - novideo              False
                                192.168.178.91 MainThread - deletepics           False
                                192.168.178.91 MainThread - maxffmpeg            2
                                192.168.178.91 MainThread - keepfiles            False
                                192.168.178.91 MainThread - # Execution
                                192.168.178.91 MainThread - dontwait             False
                                192.168.178.91 MainThread - seconds              0
                                192.168.178.91 MainThread - detect               layer
                                192.168.178.91 MainThread - pause                yes
                                192.168.178.91 MainThread - movehead             [10.0, 10.0]
                                192.168.178.91 MainThread - rest                 1
                                192.168.178.91 MainThread - standby              False
                                192.168.178.91 MainThread - restart              False
                                192.168.178.91 MainThread - # Camera
                                192.168.178.91 MainThread -  camera1             usb
                                192.168.178.91 MainThread - camera2
                                192.168.178.91 MainThread - weburl1
                                192.168.178.91 MainThread - weburl2
                                192.168.178.91 MainThread - # Video
                                192.168.178.91 MainThread - extratime            0
                                192.168.178.91 MainThread - fps                  10
                                192.168.178.91 MainThread - minvideo             5
                                192.168.178.91 MainThread - # Overrides
                                192.168.178.91 MainThread - camparam1
                                192.168.178.91 MainThread - camparam2
                                192.168.178.91 MainThread - vidparam1
                                192.168.178.91 MainThread - vidparam2
                                192.168.178.91 MainThread - # UI
                                192.168.178.91 MainThread - hidebuttons          False
                                192.168.178.91 MainThread - # Special Functions
                                192.168.178.91 MainThread - execkey
                                192.168.178.91 MainThread - -----------------------------------------------------------------------
                                
                                
                                192.168.178.91 MainThread - Command Exception: fswebcam --version
                                192.168.178.91 MainThread - Command 'fswebcam --version' returned non-zero exit status 255.
                                192.168.178.91 MainThread - Module 'fswebcam' is required.
                                192.168.178.91 MainThread - Obtain via 'sudo apt install fswebcam'
                                
                                

                                Love my Duet 3 Mini.
                                https://www.instagram.com/proschi3d
                                https://youtube.com/@proschi3d
                                https://www.proschi3d.de

                                1 Reply Last reply Reply Quote 0
                                • Proschi3Dundefined
                                  Proschi3D @stuartofmt
                                  last edited by

                                  @stuartofmt

                                  Create time lapse video for Duet3D based printer. V4.1.0
                                  
                                  optional arguments:
                                    -h, --help            show this help message and exit
                                    -duet DUET            Name of duet or ip address. Default = localhost
                                    -poll POLL
                                    -basedir BASEDIR      default = This program directory
                                    -instances {single,oneip,many}
                                                          Default = single
                                    -logtype {console,file,both}
                                                          Deprecated. Use -nolog
                                    -nolog                Do not use log file
                                    -verbose              Detailed output
                                    -host HOST            The ip address this service listens on. Default = 0.0.0.0
                                    -port PORT            Specify the port on which the server listens. Default = 0
                                    -keeplogs             Does not delete logs.
                                    -novideo              Does not create a video.
                                    -deletepics           Deletes images on Terminate
                                    -maxffmpeg MAXFFMPEG  Max instances of ffmpeg during video creation. Default = 2
                                    -keepfiles            Dont delete files on startup or shutdown
                                    -dontwait             Capture images immediately.
                                    -seconds SECONDS
                                    -detect {layer,pause,none}
                                                          Trigger for capturing images. Default = layer
                                    -pause {yes,no}       Park head before image capture. Default = no
                                    -movehead MOVEHEAD MOVEHEAD
                                                          Where to park head on pause, Default = 0,0
                                    -rest REST            Delay before image capture after a pause. Default = 1
                                    -standby              Wait for command to start.
                                    -restart              Will restart when print finishes
                                    -camera1 {usb,pi,web,stream,other}
                                                          Mandatory Camera. Default = usb
                                    -weburl1 WEBURL1      Url for Camera1 if web or stream
                                    -camera2 {usb,pi,web,stream,other}
                                                          Optional second camera. No Default
                                    -weburl2 WEBURL2      Url for Camera2 if web or stream
                                    -extratime EXTRATIME  Time to repeat last image, Default = 0
                                    -minvideo MINVIDEO    Minimum video length, Default = 5
                                    -camparam1 CAMPARAM1  Camera1 Capture overrides. Use -camparam1="parameters"
                                    -camparam2 [CAMPARAM2 ...]
                                                          Camera2 Capture overrides. Use -camparam2="parameters"
                                    -vidparam1 VIDPARAM1  Camera1 Video overrides. Use -vidparam1="parameters"
                                    -vidparam2 VIDPARAM2  Camera2 Video overrides. Use -vidparam2="parameters"
                                    -fps FPS              Frames-per-second for video. Default = 10
                                    -hidebuttons          Hides buttons not logically available.
                                    -execkey EXECKEY      string to identify executable command
                                  pi@RepetierServer:~/Duetlapse $
                                  
                                  

                                  i installed everything.
                                  when I start it as shown above this comes up

                                  Love my Duet 3 Mini.
                                  https://www.instagram.com/proschi3d
                                  https://youtube.com/@proschi3d
                                  https://www.proschi3d.de

                                  stuartofmtundefined 1 Reply Last reply Reply Quote 0
                                  • stuartofmtundefined
                                    stuartofmt @Proschi3D
                                    last edited by stuartofmt

                                    @Proschi78
                                    When you say that you installed everything. Do you mean that you installed fswebcam?
                                    How do you normally view the webcam i.e independently of DuetLapse ?

                                    -host can normally be left out as that is the ip for the web interface to DuetLapse and the program will normally work it out itself.

                                    Are you saying that the second image is what you see on the console when you try to start DuetLapse.? What is the command line you are using ? That output should only occur if there is an invalid option used and it would be reported. This looks like the output when -h is used

                                    Please use -verbose until we get you running properly as the extra info can be very helpful.

                                    Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                                    • Proschi3Dundefined
                                      Proschi3D @stuartofmt
                                      last edited by Proschi3D

                                      @stuartofmt i usually use mjpeg stream to see the camera in the DWC

                                      I installed fswebcam.
                                      but would like to use mjpeg streamer for that.
                                      Then I only have to specify the printer ip when starting?

                                      pi@RepetierServer:~/Duetlapse $  python3 ./DuetLapse3.py -duet 192.168.178.91 -pause yes -movehead 10 10
                                      

                                      Love my Duet 3 Mini.
                                      https://www.instagram.com/proschi3d
                                      https://youtube.com/@proschi3d
                                      https://www.proschi3d.de

                                      stuartofmtundefined 1 Reply Last reply Reply Quote 0
                                      • stuartofmtundefined
                                        stuartofmt @Proschi3D
                                        last edited by stuartofmt

                                        @Proschi78 said in DuetLapse3:

                                        @stuartofmt i usually use mjpeg stream to see the camera in the DWC

                                        I installed fswebcam.
                                        but would like to use mjpeg streamer for that.
                                        Then I only have to specify the printer ip when starting?

                                        Ok - so there is a little confusion here - lets fix that 🙂

                                        To get started, its best to use minimal options and make sure DuetLapse can "see" the webcam and your printer. Often the "hard" part is sorting out the camera connection since this can vary quite a lot from camera-to-camera.

                                        Lets start with the camera:
                                        You want to use mjpeg-streamer? That should be fine. (Shameless plug https://forum.duet3d.com/topic/23759/videostream)
                                        Using mjpeg (or other) streamer: make sure its set up so that you can view the stream in your browser. What is that url ? you will use it below.

                                        For DuetLapse:
                                        The minimum options to start DuetLapse are:
                                        - duet # the same ip address you would use for DWC
                                        - port # this is the port number you want the DuetLapse http server to use
                                        - basedir # not strictly necessary but best to include so as to not clutter the DuetLapse program folder

                                        and of course (for now) add:
                                        -verbose

                                        Now you need some camera settings. Since you will be using a streaming url you do not want to specify usb. Instead try this (its what I do) 🙂
                                        -weburl1 the url (that allows you to stream in browser
                                        e.g. http://192.168.1.1:8081/mjpeg
                                        -camera1 other
                                        -camparam1= "'ffmpeg ' + ffmpegquiet + ' -y -i ' +weburl+ ' -vframes 1 ' +fn+debug" take careful note of spaces and " and '

                                        When DuetLapse starts successfully: You will be able to access it locally using http://localhost:port where port was set with -port or you can access it locally or remotely with http://ip:port where ip is the ip address if the machine running DuetLapse (this is NOT set as an option).

                                        Let me know how you get on.

                                        BTW - I have a new / improved version coming out in the next few days. It simplifies things a bit by allowing the options to be placed in a configuration file and it has a much better UI. Once you are up and running the new version is just a file copy as it uses all the same config settings.

                                        Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                                        • Proschi3Dundefined
                                          Proschi3D @stuartofmt
                                          last edited by

                                          @stuartofmt no matter what I enter, it always comes up with this message

                                          
                                          pi@RepetierServer:~/Duetlapse $ python3 DuetLapse3.py -duet 192.168.178.91
                                          192.168.178.91 MainThread - ################### Options at start of this print job  #####################
                                          192.168.178.91 MainThread - # Environment
                                          192.168.178.91 MainThread - duet                 192.168.178.91
                                          192.168.178.91 MainThread - basedir              /home/pi/Duetlapse
                                          192.168.178.91 MainThread - poll                 12
                                          192.168.178.91 MainThread - instances            single
                                          192.168.178.91 MainThread - logtype              both
                                          192.168.178.91 MainThread - nolog                False
                                          192.168.178.91 MainThread - verbose              False
                                          192.168.178.91 MainThread - host                 0.0.0.0
                                          192.168.178.91 MainThread - port                 0
                                          192.168.178.91 MainThread - keeplogs             False
                                          192.168.178.91 MainThread - novideo              False
                                          192.168.178.91 MainThread - deletepics           False
                                          192.168.178.91 MainThread - maxffmpeg            2
                                          192.168.178.91 MainThread - keepfiles            False
                                          192.168.178.91 MainThread - # Execution
                                          192.168.178.91 MainThread - dontwait             False
                                          192.168.178.91 MainThread - seconds              0
                                          192.168.178.91 MainThread - detect               layer
                                          192.168.178.91 MainThread - pause                no
                                          192.168.178.91 MainThread - movehead             [0.0, 0.0]
                                          192.168.178.91 MainThread - rest                 1
                                          192.168.178.91 MainThread - standby              False
                                          192.168.178.91 MainThread - restart              False
                                          192.168.178.91 MainThread - # Camera
                                          192.168.178.91 MainThread -  camera1             usb
                                          192.168.178.91 MainThread - camera2
                                          192.168.178.91 MainThread - weburl1
                                          192.168.178.91 MainThread - weburl2
                                          192.168.178.91 MainThread - # Video
                                          192.168.178.91 MainThread - extratime            0
                                          192.168.178.91 MainThread - fps                  10
                                          192.168.178.91 MainThread - minvideo             5
                                          192.168.178.91 MainThread - # Overrides
                                          192.168.178.91 MainThread - camparam1
                                          192.168.178.91 MainThread - camparam2
                                          192.168.178.91 MainThread - vidparam1
                                          192.168.178.91 MainThread - vidparam2
                                          192.168.178.91 MainThread - # UI
                                          192.168.178.91 MainThread - hidebuttons          False
                                          192.168.178.91 MainThread - # Special Functions
                                          192.168.178.91 MainThread - execkey
                                          192.168.178.91 MainThread - -----------------------------------------------------------------------
                                          
                                          
                                          192.168.178.91 MainThread - Command Exception: fswebcam --version
                                          192.168.178.91 MainThread - Command 'fswebcam --version' returned non-zero exit status 255.
                                          192.168.178.91 MainThread - Module 'fswebcam' is required.
                                          192.168.178.91 MainThread - Obtain via 'sudo apt install fswebcam'
                                          
                                          

                                          Love my Duet 3 Mini.
                                          https://www.instagram.com/proschi3d
                                          https://youtube.com/@proschi3d
                                          https://www.proschi3d.de

                                          1 Reply Last reply Reply Quote 0
                                          • Proschi3Dundefined
                                            Proschi3D
                                            last edited by

                                            pi@RepetierServer:~/Duetlapse $ python3 DuetLapse3.py -weburl1 http://192.168.178.70:8081/stream
                                            localhost MainThread - ################### Options at start of this print job  #####################
                                            localhost MainThread - # Environment
                                            localhost MainThread - duet                 localhost
                                            localhost MainThread - basedir              /home/pi/Duetlapse
                                            localhost MainThread - poll                 12
                                            localhost MainThread - instances            single
                                            localhost MainThread - logtype              both
                                            localhost MainThread - nolog                False
                                            localhost MainThread - verbose              False
                                            localhost MainThread - host                 0.0.0.0
                                            localhost MainThread - port                 0
                                            localhost MainThread - keeplogs             False
                                            localhost MainThread - novideo              False
                                            localhost MainThread - deletepics           False
                                            localhost MainThread - maxffmpeg            2
                                            localhost MainThread - keepfiles            False
                                            localhost MainThread - # Execution
                                            localhost MainThread - dontwait             False
                                            localhost MainThread - seconds              0
                                            localhost MainThread - detect               layer
                                            localhost MainThread - pause                no
                                            localhost MainThread - movehead             [0.0, 0.0]
                                            localhost MainThread - rest                 1
                                            localhost MainThread - standby              False
                                            localhost MainThread - restart              False
                                            localhost MainThread - # Camera
                                            localhost MainThread -  camera1             usb
                                            localhost MainThread - camera2
                                            localhost MainThread - weburl1              http://192.168.178.70:8081/stream
                                            localhost MainThread - weburl2
                                            localhost MainThread - # Video
                                            localhost MainThread - extratime            0
                                            localhost MainThread - fps                  10
                                            localhost MainThread - minvideo             5
                                            localhost MainThread - # Overrides
                                            localhost MainThread - camparam1
                                            localhost MainThread - camparam2
                                            localhost MainThread - vidparam1
                                            localhost MainThread - vidparam2
                                            localhost MainThread - # UI
                                            localhost MainThread - hidebuttons          False
                                            localhost MainThread - # Special Functions
                                            localhost MainThread - execkey
                                            localhost MainThread - -----------------------------------------------------------------------
                                            
                                            
                                            localhost MainThread - Command Exception: fswebcam --version
                                            localhost MainThread - Command 'fswebcam --version' returned non-zero exit status 255.
                                            localhost MainThread - Module 'fswebcam' is required.
                                            localhost MainThread - Obtain via 'sudo apt install fswebcam'
                                            pi@RepetierServer:~/Duetlapse $
                                            
                                            

                                            Love my Duet 3 Mini.
                                            https://www.instagram.com/proschi3d
                                            https://youtube.com/@proschi3d
                                            https://www.proschi3d.de

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