Jump to content
UltiMaker Community of 3D Printing Experts

Making Time Lapse Videos with the Ultimaker 3


unlimitedbacon

Recommended Posts

  • 1 month later...
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
  • Link to post
    Share on other sites

    • 10 months later...
    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.

  • Link to post
    Share on other sites

    • 3 months later...
    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

  • 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

  • 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?

  • 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! 🙂

  • 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.

  • 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! 😁

  • Link to post
    Share on other sites

    Guest maht
    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.

  • 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 😃

  • Link to post
    Share on other sites

    Guest maht
    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.

  • 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 😃

  • Link to post
    Share on other sites

    Posted · Making Time Lapse Videos with the Ultimaker 3

    Can I use this with S3?

  • 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...

  • Link to post
    Share on other sites

    Posted · Making Time Lapse Videos with the Ultimaker 3

    Is there any reason this can't be run on a Raspberry Pi 3 with a decent sized SD card installed?

     

    Also, it is something that can be left running all the time, so it creates a new video file every time the printer runs a job (perhaps incrementing the name by one digit)?  Or does it need to be run manually before you start every print job?

  • Link to post
    Share on other sites

    Posted · Making Time Lapse Videos with the Ultimaker 3

    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?

    I do also have a Raspberry Pi 3B+ to hand.

    Thanks!

  • Link to post
    Share on other sites

    Posted · Making Time Lapse Videos with the Ultimaker 3

    Hey! I know this thread is FOUR years since last comment, but I wanted to comment for anybody still looking at this.

     

    The code still works on Python 3 on an Ultimaker S5 and Windows 11 in late 2022. I downloaded and installed everything today, and it's running beautifully right now.

     

    To answer Zaqi's question immediately previous (and four years ago...) yes, I had to do the "pip install" for the requests module, as described several times in earlier posts in this thread. I hope Zaqi found the answer. 🙂

     

    I will also echo comments from other places on the Internet -- it would sure be great if this were integrated natively into Cura. We have cameras built into the printers -- why not use them? All people would do is market for you, with this capability!

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Making Time Lapse Videos with the Ultimaker 3

    Trying to run this on a Raspberry Pi 3B+

     

    Installed Python 3.11.0

    Installed x264

    Installed FFMPEG

     

    Can't get it to run using "sudo python timelapse.py 192.168.0.39 60 timelapse.mp4"

     

    get invalid syntax error on line 80 

    Quote

    print("Print progress: %s Image: %05i" % (progress(),count), end='\r' )

     

    I have already started the print though so could be reason why

    Edited by cdrose
  • 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
     Share

    • Our picks

      • Here it is. The new UltiMaker S7
        The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.
         
         
        So what’s new?
        The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.
         
        The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because...it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.
         
        The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.
         

         
        The UltiMaker S7 also includes quality of life improvements:
        Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
        Curious to see the S7 in action?
        We’re hosting a free tech demo on February 7.
        It will be live and you can ask any questions to our CTO, Miguel Calvo.
        Register here for the Webinar
          • Like
        • 10 replies
      • UltiMaker Cura 5.3.0-Alpha 🎄 Tree Support Spotlight 🎄
        Are you a fan of tree support, but dislike the removal process and the amount of filament it uses? Then we would like to invite you to try this special release of UltiMaker Cura. Brought to you by our special community contributor @thomasrahm
         
        We generated a special version of Cura 5.2 called 5.3.0 Alpha + Xmas. The only changes we introduced compared to UltiMaker Cura 5.2.1 are those which are needed for the new supports. So keep in mind, this is not a sneak peek for Cura 5.3 (there are some really cool new features coming up) but a spotlight release highlighting this new version of tree supports.  
          • Like
        • 17 replies
      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 14 replies
    ×
    ×
    • Create New...