Search code examples
visual-c++movie

Control Timing of Movie, Gnuplot with C++


May you tell me how can I control the timing of the movie made of many data files please? It is going so fast that looks weird. I want to make it slow so that I could see the complete pattern. Thank you for your time.

Update: I am using: ffmpeg -f image2 -r 10 -i %d.gif video2.mpg

But it gives an error and gives out no output.


Solution

  • You can use the Win32 Sleep() function to pause for a few milliseconds between frames/plots/data files.

    Update: You didn't mention ffmpeg originally, so I thought you were developing your own C++ playback code. It appears you're trying to build and execute a ffmpeg command from inside your C++ code, instead. According to the ffmpeg documentation, the -r option controls the frame rate, so just lower it if you want the playback to be slower.

    You may need to specify all the GIF file names (via multiple -i filename options) in a single ffmpeg command.