cloakfiend 996
Real nice job man! Looks great!
Would love a step by step tut on how to implement this. this was done using the inbuilt camera i assume? Hope its not too technical!
Real nice job man! Looks great!
Would love a step by step tut on how to implement this. this was done using the inbuilt camera i assume? Hope its not too technical!
@cloakfiend yep! It uses the built-in API to access the required information including the camera. The original code just has a time delay for when it takes pictures to build the timelapse, but I wanted the head to move out of the way too. So I looked at the X and Y position when the printer changes printcores and does its thing and told my forked code to watch for that exact position. Therefore whenever the printcores change, we take a picture and build a timelapse!
Setting it up to work on any given computer should be fairly easy. I'm using a Linux server (Raspberry Pi) so it was not hard for me to set up. All you need to do is install Python 3 (latest) and install ffmpeg for your system. Then run the script on the command line with the IP address of the printer, the number of seconds of postroll you want (probably 1) and the output file like `timelapse_1.mkv` or something.
1 hour ago, starbuck said:All you need to do is install Python 3 (latest) and install ffmpeg for your system. Then run the script on the command line with the IP address of the printer
where do i run the script? where do the frames/video get saved?
p.s. your z screw looks like it could do with a clean!
Edited by cloakfiendThis concept should be integrated in the standard firmware, I think. Maybe best as an option?
definitely!
3 hours ago, cloakfiend said:
where do i run the script? where do the frames/video get saved?
p.s. your z screw looks like it could do with a clean!
The latest code is on GitHub here https://github.com/starbuck93/um3timelapse. Use the "Clone or Download" green button and then click "Download ZIP". Or "Clone" it if you're so inclined! Go ahead and unzip it where you downloaded it, probably in the Downloads folder, or your Desktop or wherever. After that, go to the unzipped folder, and at this point it depends on your operating system. For Windows I'd say to run `cmd` and then all you'd do is `cd` to the unzipped folder and run `python3 timelapse.py 0.0.0.0 1 video.mkv` and let it run! It handles the frames automatically so you'll never see a folder full of pictures and the video is saved in the same folder you run the python script in.
3 hours ago, geert_2 said:This concept should be integrated in the standard firmware, I think. Maybe best as an option?
That would be really cool. I suspect there would have to be support for saving to the USB stick as there is not much onboard storage for these types of things!
Thanks for the info, your video inspired me so much I just went and ordered myself a gopro7 hero black!
I wanna give this a go badly!, been meaning to do time-lapses for a while but was too lazy, now I'm better I'm super motivated, just finishing up a sculpt first though!
hi all,
i'm just trying to use this application.
i've installed python 3.7, downloaded both the GitHub files and ffmpeg, when i try to runt he command as stated in the installation guide i get this error message:
B:\timelapse\um3timelapse-master>timelapse.py 192.168.140.189 1 test.mkv
Traceback (most recent call last):
File "B:\timelapse\um3timelapse-master\timelapse.py", line 4, in <module>
from requests import exceptions
ModuleNotFoundError: No module named 'requests'
am i using the command wrong?
can you please help?
thanks.
Hey @PaulMiles! Here's the information in your error message that's important: ModuleNotFoundError: No module named 'requests'
To fix that, I'd use python-pip to install the package called requests like this
pip install requests
or "pip3" if just plain "pip" doesn't work for some reason. pip3 is the python3 specific version.
16 hours ago, starbuck said:Hey @PaulMiles! Here's the information in your error message that's important: ModuleNotFoundError: No module named 'requests'
To fix that, I'd use python-pip to install the package called requests like this
pip install requests
or "pip3" if just plain "pip" doesn't work for some reason. pip3 is the python3 specific version.
hi Starbuck!
that's great it worked!
but now when creating the video i'm facing another error, i think it's failing to use ffmpeg for some reason, not sure why.
:: Encoding video
ffmpeg -r 30 -i C:\Users\<username>\AppData\Local\Temp\tmp9ifx3knq\%05d.jpg -vco
dec libx264 -preset veryslow -crf 18 -loglevel panic test.mkv
'ffmpeg' is not recognized as an internal or external command,
operable program or batch file.
does the .exe need to be in the same folder of the script or something?
thanks again for your help :)
3 hours ago, PaulMiles said:does the .exe need to be in the same folder of the script or something?
Yes, I believe it does. It sounds like you might be using windows? You can either
Thanks Starbuck
I'm getting closer! it's now creating a video but it doesn't show the build.
I have checked the temp folder where the the captures are saved and it has one image from when the print starts with the buildplate lowered and 30 images from when the print has finished, again with the build plate lowered.
It doesn't seem to be taking any captures during the print.
I think I have my file set up as you describe, dual colour with printcore 2 doing a dummy model 1mm x 1mm the height of the main model.
Any ideas?
Thanks
Paul
13 hours ago, PaulMiles said:Any ideas?
Yes, I think I know what's going on. It's the (x,y) position of the head in the corner there. I mean the physical position of where the Ultimaker head parks, not the tall 1x1mm dummy object. I wonder if the coordinates are exactly the same as mine or if something like firmware or Cura versions change it.
Here's how to test it,
During the first couple of layers of your print, run this python3 test.py: https://github.com/starbuck93/um3timelapse/blob/master/test.py after editing IP_ADDRESS in the script to be the IP address of your printer. While the (benchy, calibration cube, whatever) print is running like you have set up in the screenshot, the test.py script will output X and Y coordinates of the head. When the head is parked in the corner waiting for PrintCore 1 or 2 to reach the correct temperature to resume printing, check what the X and Y coordinates are. When I was testing, I saw the same coordinate set around 3 times in a row.
After that, in timelapse.py, go edit the location_check function (link to github) to have the X and Y coordinates you discovered with the test.py script.
For UM3 I found test.py output x213 y189 and I also saw x209.375 y193.0 several times too. I ended up with 213,189 in mine, but yours could be different.
@starbuck You could improve the script and check if x and y is within a range to compensate small differences. But be careful you also need to manage that you already took a photo for this layer, because when using a range, your script will fire more than once. I would check also the z position and if you already shoot a photo for this z layer, then don't trigger again.
10 hours ago, Smithy said:@starbuck You could improve the script and check if x and y is within a range to compensate small differences. But be careful you also need to manage that you already took a photo for this layer, because when using a range, your script will fire more than once. I would check also the z position and if you already shoot a photo for this z layer, then don't trigger again.
I like your thought process here! Checking the Z position would be very helpful. Perhaps I can make a second script to "run once" and double check the values during a test print (calibration cube type thing).
I would try to give it a range of about 10 steps (maybe more ?), then the user who is using the script don't have to check his exact position and have to modify the values in the script - it will always work (hopefully, was just an idea ?)
Thanks for the tips. I have had to run the printers for actual jobs this week so will try and get it working at the end of the week. I will let you know how it goes!
Thanks
heres my gopro timelapse...... got a few ideas of moving the print head out of the way, especially at the end.
I have gotten everything working but like PaulMiles it takes 1 picture at the start and 30 at the end with none in the middle. I checked the wait position and I have multiple lines of test.py output at x213.0 y189.0 and x213.0 y207.0 also x212.04410000000001 y173.66469999999995 and x210.5625 y192.59999999999997. Out of desperation I have tried them all with the same result of 1 picture at the start and 30 at the end with none in the middle. Print progress: 00.00 % Image: 00001 is displayed at the bottom and doesn't update. I am using python3 3.8.2 home-brew-0.1.11 FFMPEG 4.2.2 on a MacBook Pro using Terminal. The print I am testing with is 18 mins long and 102 layers.
Hi everyone,
Does this still work with Cura 5.0?
What's the best solution at the moment with Cura 5.0 to get a timelapse video of our prints?
Thanks!
Recommended Posts
starbuck 25
The print time is increased by the nozzle switching. I increased an 8.5 hour print to 9 hours by adding the ghost tower for extruder 2 in the corner. I feel that is an acceptable amount of time for the reward.
I haven't had any nozzle clogs yet but I've only done this a handful of times already. I suspect you're correct and that the 2nd nozzle will clog after a little bit of time doing this.
Also, I've added support for the Ultimaker S5 as well and I'm testing that right now with the print I mentioned above!
Link to post
Share on other sites
Smithy 1,146
+ 0.5 hours is ok, I expected something more.
Regarding nozzle, I mean you could set the temperature for the core 2 to something really low, then nothing should happen with the nozzle.
Link to post
Share on other sites