DuetLapse3
-
@stuartofmt
The stopping early thing was actually a problem with my end gcode. -
I'm using version 4.x of ffmpeg, only because I had to compile it some time ago for the Pi. With V7 you should be OK.
You should take a look at the captured images to see what resolution they are (with the alternate capture options I provided).
I'll wait until you generate a video and we can take a look to see if anything changed.
As an aside (and I will check), to the best of my knowledge the video creation command does not alter the resolution at all. I did check some of my captures (set to 800x600 in videostream) and the video resolution matches.
-
@stuartofmt
I managed to capture a time lapse with your settings on a longer print.
https://1drv.ms/v/s!ArZNmx9oeG5CzQMVW0IGIgVbwagj?e=QrnVhR
Don't know why my printer is making little poops, but whatever. That's a different issue. -
@stuartofmt
The captured images are 720p -
@osterac said in DuetLapse3:
@stuartofmt
Don't know why my printer is making little poops, but whatever. That's a different issue.Its hard to say - but it looks like excess filament is adhering to the nozzle then dropping off. You might have the nozzle a tad too hot (the initial bridging is drooping quite a bit over that short distance).
In any case - there is a very complete set of calibration steps here:
https://www.youtube.com/watch?v=kgCjDy_IgXg -
@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.