Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timelapse recording ending #384

Closed
smartroad opened this issue Feb 17, 2014 · 20 comments

Comments

Projects
None yet
5 participants
@smartroad
Copy link

commented Feb 17, 2014

I was wondering, could the timelapse be setup to allow a few seconds of video showing the finished print? At the moment the timelapse stops as soon as the print has finished and you never get to see what the final print was.

@bubbasnow

This comment has been minimized.

Copy link

commented Feb 23, 2014

you might be able to get around this by adding some additional travel or a pause after the finishing gcode, in kiss this is accomplished in the post g-code section

@CraigRK

This comment has been minimized.

Copy link

commented Mar 3, 2014

Foosel: I added a number of redundant Z-moves with pauses to the end of my G-Code, but it doesn't seem to take multiple frames. What logic in the code causes a new frame to be taken?

This is the code I added (10 times)
;Pause for 1 seconds
G4 S1
;Lift Z 0.2
G91
G0 F6000 Z0.2
G90

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 3, 2014

Z-based or time-based timelapse?

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 3, 2014

I added a new option to the timelapse configuration page (in the devel branch). You can now define a number of seconds that should be added as post roll to the rendered movie. So if you use a timed timelapse and enter a value of 1sec here (default is 0), the image capturing will continue for another 25s (since the movie is rendered at 25fps) after the end of the print job. For z-triggered timelapses, only one additional image is captured but inserted multiple times (25times for the above example) to fill up the requested post roll duration.

image

@foosel foosel closed this Mar 3, 2014

@CraigRK

This comment has been minimized.

Copy link

commented Mar 4, 2014

You're brilliant, thanks.

My question was related to Z-based BTW. I guess I wasn't adding enough frames.

I've written a post-processing script which sorts out get the bed in the right place for issue 370 (#370) but was trying this as the same time.

@CraigRK

This comment has been minimized.

Copy link

commented Mar 4, 2014

BTW: By this "the image capturing will continue for another 25s ", did you actually mean "the image capturing will continue for another 25 frames", as logically the 2 options end up with different results this way?

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 4, 2014

25 frames with a capturing interval of 1s will take 25s.

So what I actually meant was, the movie won't be starting to render until
25s after the print ended since more images will be captured.

For z triggered Timelapse that's different, since there only one image will
be captured for post roll and used multiple times, so there's no delay.

@CraigRK

This comment has been minimized.

Copy link

commented Mar 4, 2014

Ok, understood. Makes sense now. So you capture for 25s, but that's 1 more second of footage.

Thanks again for doing this. I'll pull down the devel branch and try it out (maybe on the weekend). If I can make sense of where the changes are needed then I might try to make the Z-changes as an option that I made for the gcode post processing script

@CraigRK

This comment has been minimized.

Copy link

commented Mar 5, 2014

Apologies for being stupid (I'm a Github novice), but I tried to find a commit relating to your comment above and can't. You haven't reference this issue and manually looking at all the commits you made month, I can't find any that appear to do what you said above.

foosel added a commit that referenced this issue Mar 5, 2014

Added post roll to timelapse
You can now define an amount of seconds that should be added to the rendered timelapse (so, since the current fps setting is 25 frames per seconds, 25 * the configured amount of post roll seconds images will need to be captured).

Timed timelapses add this to the actual run time of the timelapse capturing process (so if you configure 1s post roll, a timed timelapse will run 25s longer than the print)

Z-triggered timelapses just create one last capture from the webcam and use this image again and again (so 25 times for a post roll of 1s).

Implements #384
@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2014

Not your fault, I managed to open the commit dialog in my IDE, but forgot to click commit -- I guess it was simply too late. Sorry, it's pushed now (see above)!

@ymilord

This comment has been minimized.

Copy link

commented Mar 5, 2014

Hrmm I applied this commit rebooted and got this

2014-03-05 15:29:24,759 - octoprint.gcodefiles - INFO - Migrating metadata if necessary...
2014-03-05 15:29:24,763 - octoprint.gcodefiles - INFO - Updated 0 sets of metadata to new format
Traceback (most recent call last):
File "./run", line 30, in
octoprint.main()
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/init.py", line 64, in main
octoprint.run()
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/server/init.py", line 138, in run
octoprint.timelapse.configureTimelapse()
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/timelapse.py", line 76, in configureTimelapse
postRoll = config["postRoll"]
KeyError: 'postRoll'

Aside from the update, Nothing has changed.

foosel added a commit that referenced this issue Mar 5, 2014

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2014

Did I mention that it was late... cough

Try again please, just pushed a fix for that.

@ymilord

This comment has been minimized.

Copy link

commented Mar 5, 2014

New errors

Traceback (most recent call last):
File "/usr/local/bin/octoprint", line 9, in
load_entry_point('OctoPrint==1.1.0-dev', 'console_scripts', 'octoprint')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/init.py", line 4, in
from octoprint.server import Server
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/server/init.py", line 33, in
from octoprint.server.util import LargeResponseHandler, ReverseProxied, restricted_access, PrinterStateConnection, admin_validator
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/server/util.py", line 22, in
from octoprint.settings import settings
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/settings.py", line 370
del confifrom future import absolute_import
^
SyntaxError: invalid syntax

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2014

Hm, nope, that's on your end, in the repository that file looks totally fine: https://github.com/foosel/OctoPrint/blob/devel/src/octoprint/settings.py#L370

@ymilord

This comment has been minimized.

Copy link

commented Mar 5, 2014

... Okay. The only thing I did was update to the latest and reboot. Everything was working fine.

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2014

Any issues during update, any weird messages? Because this there looks like some file corruption, like something tried copying over a file halfway through another.

Please try the following from within your checked out OctoPrint git tree (can't test this right now, but basically, backup the installed packages somewhere safe and reinstall):

  1. mkdir ~/OctoPrint-backup
  2. sudo mv /usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg ~/OctoPrint-backup
  3. sudo python setup.py install
@ymilord

This comment has been minimized.

Copy link

commented Mar 5, 2014

I ended up deleting the /use/local/lib/python... folder and ~/Octoprint and re-git everything in order to get it back up and running.

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2014

I'm sorry to hear that, however I can assure you that this was not caused
by anything in the updates you pulled.

@ymilord

This comment has been minimized.

Copy link

commented Mar 6, 2014

Its okay, Just didn't expect that kind of side effect. I was trying to start a print and leave for an appointment. Did need that to happen then.

@foosel

This comment has been minimized.

Copy link
Owner

commented Mar 6, 2014

Yeah, I know, Murphy-striker are definitely not something on my
things-I-love-list either ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.