Save sketch output to video without missing frames

edited February 2017 in How To...

Hi, first I am sorry if this question was asked thousand times before, but I searched for answers and did not find them.

Problem: i just did some coding for a visual output using text which should be edited as a video later. Everything works so far..

But as I tried to save the programs result with saveFrame() I realized that the framerate of the program is not stabile. If I later open the images generated with saveFrame() as a Video the result is more like some random speed fast slow …

As my code shows text and blends it, the speed should really be stable as the blending changes other ways.

Is there a way to give processing more priority on the computer so the output is more stable, or are there any better ways to get a video of the sketchs output?

Answers

  • edited February 2017

    Maybe you should access each frame one at the time so you can save all of them removing in this way any dependency to the processing capabilities of your equipment or the resolution of your video source? There is an example provided by the video library. Go to Files>>examples and then go to Libraries>>Video>>Movie>>Frames.pde

    Also: https://forum.processing.org/two/search?Search=realtime

    Kf

  • You can use command line tools like ffmpeg or imagemagick to make a video from your frames, if that's what you're asking.

  • edited February 2017 Answer ✓

    @baltensperger -- were you able to resolve your question?

    There are two potential unrelated issues:

    1. saveFrame() isn't capturing the moments that you want, e.g. due to uneven lag between draw() calls, and you need to use non-realtime rendering or stronger hardware
    2. you are trying to play a group of images as a movie dynamically, when what you should do is pre-render the movie file to gain better playback performance (as suggested by bearmountainbranch)

    If your problem is 1, 2 won't help you.

Sign In or Register to comment.