DuetLapse3
-
@chrishamm does specifying the dependencies cause them to be installed, or for the plugin installation to fail if they are not present?
-
@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.
-
This is good news! To be clear:
sbcPythonDependencies
attempts apython -m pip install xyz
?Also what's the difference between
dfs-python
and "regular" python? What python version is it based on ? -
-
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
-
@stuartofmt said in DuetLapse3:
This is good news! To be clear:
sbcPythonDependencies
attempts apython -m pip install xyz
?Actually, it depends on what you have in your
/opt/dsf/conf/plugins.json
it uses the commands defined byInstallPythonPackageCommand
and with arguments defined byInstallPythonPackageArguments
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. -
Thanks! I’ll be restarting efforts on a Duetlapse plug-in soon.
-
@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.mdAlso this:
https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3 Useage Examples.mdIf 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.
-
@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'
-
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 -
@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.
-
@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
-
@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 folderand of course (for now) add:
-verboseNow 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.
-
@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'
-
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 $
-
@Proschi78
In both cases you are still using -camera1 usb (either explicitly of by default). This forced the program to try and use fswebcam. In any case fswebcam does not appear the be installed.
In the second example you did not include all the options that I gave in the post above. Mandatory options like -duet and -port are missing, along with others. It cannot work given the command line input you used.
Does putting
http://192.168.178.70:8081/stream
in your browser (on the raspberry pi) display the camera stream ? Do this just to make sure there is no network issue e.g. the camera url is blocked).If so - then the options I gave above should magically work
-
no such option: -d pi@RepetierServer:~/Duetlapse $ python3 -m pip -duet 192.168.178.91 -port 8025-verbose -weburl1 http://192.168.178.70:8081/?action=stream Usage: /usr/bin/python3 -m pip <command> [options] no such option: -d pi@RepetierServer:~/Duetlapse $
-
@Proschi78
I'm not sure what you are trying to tell me here?
pip
is for installing python modules. Also - its best to answer / confirm the interim questions so that the person helping knows what you know. Again, you have not included the options I recommended. What you should be entering is this: Note that its all one line.(I recomend you copy/paste)python3 ./DuetLapse3.py -duet 192.168.178.91 -port 8025 -verbose -weburl1 http://192.168.178.70:8081/?action=stream -camera1 other -camparam1= "'ffmpeg ' + ffmpegquiet + ' -y -i ' +weburl+ ' -vframes 1 ' +fn+debug"
Depending on whether you have installed the required python modules (it looks like you may have been) then there is no reason why this does not start properly provided (1) the ip address for -duet is correct and (2) -weburl1 when placed in a browser, displays the camera stream.
P.S. you can also try this form. I prefer the one above because it sidesteps some possible issues with certain streaming cameras.
python3 ./DuetLapse3.py -duet 192.168.178.91 -port 8025 -verbose -weburl1 http://192.168.178.70:8081/?action=stream -camera1 stream
-
@stuartofmt ok the pip was the problem.
thank you very much now I'm testing it.
Duetlapse is now available in the browser -
@Proschi78
Great !!
If you like, you can try this version. I'm about to release it but have to update the documentation first. Its fully backward compatible and uses the same options. There are a few fixes but the main difference is the UI.
All you need to do is replace the existing DuetLapse3.py file with this one (rename it first ).
-
@stuartofmt
I tried again yesterday.
in the browser I see Duetlapse.
Duetlapse is also connected to the printer.
I see the current layer, etc. only pictures are not madeI will test the new version tonight.
Thanks