DuetLapse3
-
@osterac said in DuetLapse3:
@stuartofmt
The captured images are 720pOk - so there you have it. Motioneye is serving up the images at 720p (1280 x 720).
I did a print last night and set the resolution (in videostream) to 1920x1080. It worked as expected, creating the same resolution in the individual images and the resulting video.
I realize that I did not answer one of your earlier questions:
videostream
is installed on the computer to which the camera is attached i.e. USB or direct.Are you using an IP camera? If so - you will likely need to wrestle with motioneye settings to get the video stream to the resolution you want. If the camera can be used (without motioneye in the middle) as a USB camera then
videostream
will likely work.Video cameras are inconsistent from one setup to another.
This may help (in the case of a USB camera):
https://github.com/stuartofmt/Pi-Notes/blob/master/Resolution Testing.md -
@stuartofmt I think I will load pi os on my webcam server and install motioneye on top of that. That way I can use videostream, and it will be a newer version of motioneye.
-
@osterac said in DuetLapse3:
@stuartofmt I think I will load pi os on my webcam server and install motioneye on top of that. That way I can use videostream, and it will be a newer version of motioneye.
What type of camera do you have? Is it USB? Or is motioneye embedded in the camera itself and provides http access ?
The reason I ask is that you likely don't want motioneye and videostream both. One or the other. -
@stuartofmt it's a pi 4 with 2 USB webcams. I'll hold off with videostream then.
-
@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 .
-
@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! -
@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.
-
@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.
-
@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.
-
@T3P3Tony @stuartofmt The DSF plugin manifest already supports external package dependencies (like
ffmpeg
in this case). This is the purpose of the optionalsbcPackageDependencies
array in the plugin manifest (plugin.json
). Python/pip dependencies can be specified using the optionalsbcPythonDependencies
array. -
@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.