Jump to content

Timelapse settings ?


rogerclark

Recommended Posts

Posted · Timelapse settings ?

Hi,

The timelapse recording works well, but on small prints the video is very short, so I'd like to change how often a picture is taken, but I can't see anything in the settings about this. I've also looked in the manual, but there doesn't seem to be anything about it all all.

I'm happy to change python or even c++ code and recompile etc, can someone point me in the right area.

Thanks

Roger

 

  • Link to post
    Share on other sites

    Posted · Timelapse settings ?

    Yes.

    On Windows, V13 and V14 seem to have this feature (not tried V12 as its quite out of date).

    I didn't notice the feature until I connected an old USB web cam and expected to need to use a separate timelapse program, but a new tab appeared in the Print dialog, showing the a preview and allowing some setting changes like folder to save to and some colour correction stuff (possibly associated with the camera driver)

    However on a print that lasted an hour, the timelapse video only lasted around 10 secs, so I wanted to change how often a picture (frame) was captured.

    Looking on GitHub there are various bits of code that seem to control the timelapse.

    e.g. https://github.com/daid/Cura/search?q=timelapse&ref=cmdform

    https://github.com/daid/Cura/blob/722656b7ba94d44cdfa993e12f50a6285e939e0b/Cura/gui/util/webcam.py

    I've just had a trawl though the code and it looks like this bit of code causes the camer to take a new image

    def mcZChange(self, newZ):

    self.currentZ = newZ

    print 'Z:%f' % newZ

    if self.cam is not None:

    wx.CallAfter(self.cam.takeNewImage)

    wx.CallAfter(self.camPreview.Refresh)

    (see https://github.com/daid/Cura/blob/4d1c0da752fe45ffaf6e9257bd5d1abe86d53fe0/Cura/gui/printWindow.py)

    So I'm no expert, but it appears to be taking a photo every time the Z changes.i.e once per layer, so as my object only has 75 layers and the resultant movie is probably 24 fps, the movie is only just over 3 seconds long (which is a bit short for a 1 hour print :wink:

    I suspect that if its not too much overhear, that perhaps it could be put into

     

    
    

    def UpdateProgress(self):

    e.g around line 458, where it appers to get the print time.

     

    
    

    printTime = self.machineCom.getPrintTime() / 60

    so we could take a picture every 10 seconds using this code (probably... Note its been a while since I did any python programming :wink:

    if self.cam is not None && printTime%10 == 0:

    wx.CallAfter(self.cam.takeNewImage)

    wx.CallAfter(self.camPreview.Refresh)

     

     

    Edit.

     

    I implemented basically the change I described above, and it appears to work, however I did a print and it hung after about 10 minute.

     

    However I don't think this is necessarily a consequence of taking the timelapse video, as I have issues with power glitches, and in this case I'm fairly sure there was a brownout that hung the print.

     

    So I'll try again today and see if it hangs this time.

     

    Note. Even 10 seconds doesnt give a very long or smooth video, as at 24 fps playback, a photo every 10 secs is 1/240 normal speed, so a 1 hour print is compressed to just 15 seconds, which I think is probably too short, unless the build print is very very long, i.e even a 4 hour print would only produce 1 minute of video.

     

    Probably a better time lapse setting is between 1 and 5 seconds per frame, depending on how long the print is estimated to take.

     

    i.e Perhaps the best way to approach this is to add something to the UI where you enter the desired length of the final video e.g. 1 minute,. and the code calculates how often to take the individual pictures, based on the Estimated Print Time.

     

  • 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
    • Our picks

      • Introducing Universal Cura Projects in the UltiMaker Cura 5.7 beta
        Strap in for the first Cura release of 2024! This 5.7 beta release brings new material profiles as well as cloud printing for Method series printers, and introduces a powerful new way of sharing print settings using printer-agnostic project files! Also, if you want to download the cute dinosaur card holder featured below, it was specially designed for this release and can be found on Thingiverse! 
          • Like
        • 10 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...