Jump to content
Ultimaker Community of 3D Printing Experts
  • Sign Up
unlimitedbacon

Making Time Lapse Videos with the Ultimaker 3

Recommended Posts

Posted · Making Time Lapse Videos with the Ultimaker 3

Hi @Harry Plotter,

 

I can figure it out! thank you!!!! will post the video soon!
 

Best,

Zaqi

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

Hi @Harry Plotter,

 

I can figure it out! thank you so much for your help! will upload the video soon

Best,

Zaqi

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited) · Making Time Lapse Videos with the Ultimaker 3

It an older topic, but in case someone don't want to use Python 3, it is really easy to "port" it to Python 2. There are only 4 lines to change and it runs well with Python 2.x.

 

Here is a diff of the changes:

7,8c7
< from six.moves import urllib
---
> from urllib.request import urlopen
76c75
<     response = urllib.request.urlopen(imgurl)
---
>     response = urlopen(imgurl)
78c77
<     f = open(filename,'wb')
---
>     f = open(filename,'bw')
81c80
<     print("Print progress: %s Image: %05i\r" % (progress(), count))
---
>     print("Print progress: %s Image: %05i" % (progress(), count), end='\r')

Edited by Smithy
Typo

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

From Windows command line:

set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib

To set the PYTHONPATH permanently, add the line to your autoexec.bat. Alternatively, if you edit the system variable through the System Properties, it will also be changed permanently.

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

Hi all, and thanks @unlimitedbacon for this really nice script ! I managed to make it work without any issue but I'm new to python and I'm wondering how I could add a little pause at the end of the print, which means making a few additional snapshots once the print has ended. Any hint on how I could do that ?

Many thanks.

Tom

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

Hello everyone,

 

I tried this and did all the FFmpeg + python 3.8 and timelapse.py on the desktop, but after pressing enter on command prompt, nothing appears. Is there anything that I missed out?

 

image.thumb.png.b3550b035b42cfaab792c56576c36c60.png

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
22 hours ago, Xiaocong said:

Hello everyone,

 

I tried this and did all the FFmpeg + python 3.8 and timelapse.py on the desktop, but after pressing enter on command prompt, nothing appears. Is there anything that I missed out?

 

image.thumb.png.b3550b035b42cfaab792c56576c36c60.png

 

Seems to work for me using Python 3.5.2, are you able to try that?

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

I managed to get it running on Python 3.8 and am printing now. Thanks for the help!

 

I have 2 more questions:

1) Must the PC be on during the whole duration of the printing?

2) Where will the mp4 file be saved at? I presume desktop if I placed everything on desktop?

 

Thanks in advance! 🙂

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
2 hours ago, Xiaocong said:

I managed to get it running on Python 3.8 and am printing now. Thanks for the help!

 

I have 2 more questions:

1) Must the PC be on during the whole duration of the printing?

2) Where will the mp4 file be saved at? I presume desktop if I placed everything on desktop?

 

Thanks in advance! 🙂

 

Out of curiosity, how did you get it to work in the end?

 

1) The script is running on your PC and listening for the host (your UM3), so yes your PC will need to be on. You could set it up on an external device (e.g. a pi) if you wanted. You would have to install ffmpeg first.

2) Your argument when you run the script will determine where the outfile is saved to. So if you're in a command prompt window, it will save the to the current working directory, unless you specified an absolute path. Looking at your example above it would be: 

C:\Users\HP_Demo\Desktop\xc.mp4

Hope this helps.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
13 hours ago, maht said:

 

Out of curiosity, how did you get it to work in the end?

 

1) The script is running on your PC and listening for the host (your UM3), so yes your PC will need to be on. You could set it up on an external device (e.g. a pi) if you wanted. You would have to install ffmpeg first.

2) Your argument when you run the script will determine where the outfile is saved to. So if you're in a command prompt window, it will save the to the current working directory, unless you specified an absolute path. Looking at your example above it would be: 


C:\Users\HP_Demo\Desktop\xc.mp4

Hope this helps.

 

Thanks maht!

 

Somehow I believe my python's "PATH" was not mapped so it could not understand my commands. So I tried to map it and it could work after that.

 

Below is a short video of the timelapse test I did!

 

 

Again, thanks for all the help! 😁

  • Like 1

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
5 hours ago, Xiaocong said:

 

Thanks maht!

 

Somehow I believe my python's "PATH" was not mapped so it could not understand my commands. So I tried to map it and it could work after that.

 

Below is a short video of the timelapse test I did!

 

 

Again, thanks for all the help! 😁

 

Looks like you're running it on an S5? Good to know it works on that too.

If you're interested I made a fork of this code with a few small improvements. Still a WIP but feedback is welcome.

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
On 5/1/2020 at 5:52 PM, maht said:

 

Looks like you're running it on an S5? Good to know it works on that too.

If you're interested I made a fork of this code with a few small improvements. Still a WIP but feedback is welcome.

I am running it on an S3! and yes it works as well.

 

Oh sure, could you send me the code? I will try it 😃

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
6 hours ago, Xiaocong said:

I am running it on an S3! and yes it works as well.

 

Oh sure, could you send me the code? I will try it 😃

 

Ah, got it. Yes the link to the github repo is posted above, and also in your quote. Click "fork of this code" and it will take you there.

  • Like 1

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
8 minutes ago, maht said:

 

Ah, got it. Yes the link to the github repo is posted above, and also in your quote. Click "fork of this code" and it will take you there.

 

Thanks! I will try it and let you know 😃

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3

Can I use this with S3?

Share this post


Link to post
Share on other sites
Posted · Making Time Lapse Videos with the Ultimaker 3
On 7/3/2020 at 12:09 PM, Erkan3D said:

Can I use this with S3?

The camera location and the API hasn't changed so I would imagine yes...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...