Project Fixed Time Step Video Grabber & Fixed Time Steps Control library

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,019
Reaction score
4
Points
0
The intention of this project is creating an Orbiter module capturing the render window in constant simulation time intervals defined by the fixed time step debug feature, and encoding the captured frames into a video, by using FFmpeg/libavcodec library.

I got the idea of starting this project from this post.

The frame grabbing would take place synchronously with the simulation updates, so there would be no frames skipped or duplicated due to the Orbiter refresh rate being sometimes slower or faster than the grabbed video frame rate. This kind of video grabbing reminds more rendering an animation into a video file from a 3D graphics software than capturing a video from playing a game.

The project consists of 3 parts:
  1. FixedTimeSteps library - a (static) C++ library which enables control of fixed time steps inside simulation for the programmer;

  2. Fixed Time Steps Control module - a demo using the FixedTimeSteps library, showing its features;

  3. Fixed Time Step Video Grabber module - the whole point of starting this project; using FixedTimeSteps, GDI (or other way to grab the screen) and FFmpeg, to control simulation step length depending on capture parameters, capture the frame, and encode it into video;

Fixed time steps for video grabbing would be enabled and set by the grabbing module, without the need for specifying them in the debug features on the Launchpad. This is enabled by using FixedTimeSteps library.

The drawbacks of the synchronous video grabbing using fixed time steps are:
  • no constant sound recording - time of rendering video frames doesn't need to be constant, but only steps in simulation time are - the video wouldn't be synchronized with the sound at all;
  • user interaction with simulation can't be performed in real time, but only in simulation time - a solution to this may be recording a playback scenario, and then grabbing it when it's being replayed with fixed time steps turned on.

Project status:
  • [size=+1]FixedTimeSteps[/size] library:
    [100% COMPLETE]

  • [size=+1]Fixed Time Steps Control[/size] demonstration module:
    [100% COMPLETE]

  • [size=+1]Fixed Time Step Video Grabber[/size] module:
    [10% DONE]

The current versions of finished parts of the project (from July 2, 2013) have been uploaded into this post in attachments (sources are included in the archives).

Current documentation and Screenshots:
[table="head;width=100%"]
FixedTimeSteps library​
|
Fixed Time Steps Control​
|
Fixed Time Step Video Grabber​


|
fixed_time_steps_control.png
|
resedit_encoder.png resedit_capture.png
[/table]​

Please test the FixedTimeStepsControl module and tell me whether it's worth uploading to Orbit Hangar Mods as an utility add-on.
 

Attachments

Back
Top