Trouble with saving frames

edited December 2013 in Using Processing

i setted frameRate to 30 and used saveFrame() for 234 seconds

so the total saved frames should be 7020 frames but

i've only got about 5000 frames for result.

so when i put them into aftereffect they moves so fast!

is there any way to save frames without losses?

or is there a way to make movie from processing right away?

maybe is there a way to save frame one by one?

Answers

  • This is a regular problem, with no single simple answer. The easiest solution is to comment out the frameRate() call and just let Processing take as long as it needs to complete each frame*. This should avoid dropping frames, but your program probably won't be able to run in real time.

    If you need real time input/output, there are various methods of varying complexity, but I've never had any success with them so I'll leave it to others to fill that in if needed.

    *Based on my understanding of frameRate() I thought this would happen anyway, but perhaps not.

  • Answer ✓

    I've got an example posted below in which each frame is saved to a BlockingQueue in 1 Thread,
    while the other Thread tries to dequeue that and save() it at its own pace!

    http://forum.processing.org/one/topic/save-frames-per-second

    If you raise Processing's available RAM I believe you can save all your frames, I hope! 3:-O

Sign In or Register to comment.