Instant Replay

From FlightGear wiki
Jump to navigation Jump to search

Normal recording

Flightgear maintains an in-memory recording of the current session. To avoid running our of memory, only the last minute or so is recorded in full detail, and older data is gradually pruned.

The in-memory recording can be saved to a file.

Starting and Controlling Replay of Normal recording

  • Press Ctrl-r or select Instant Replay from the View menu to start the replay. Replay starts immediately.
  • Press p or click pause to pause/resume the replay.
  • Use the left/right arrow keys, or the <<, >> buttons to skip. You can also use the mouse and drag the time slider.
  • Use the up/down arrow keys, or the +, - buttons to change replay speed. You can replay at slow-motion, real-time or fast-forward speed.
  • Enable the Loop checkbox to continuously repeat the playback. When you configure a duration (in seconds) then only the last few seconds are continuously replayed.
The instant replay dialog.

Stopping Replay

  • Press Escape or the End Replay button to stop replay and return to the position prior to starting replay.
  • Alternatively, click the My Controls! button to take over control at any point. With this feature you can use the replay system to go back in time, regain control and then continue the flight from a past position. This is useful to train particular flight phases, such as flying the same approach again and again, maybe using different weather/wind conditions.

Record/replay on next

There are various additions to record/replay on next:

  • Extended File/Flight Recorder Control dialogue.
  • Periodic generation of a recovery snapshot, allowing resumption after a flightgear crash.
  • Continuous recording system:
    • Continuous recording to file without any loss of detail.
    • Optionally record/replay extra information:
      • Multiplayer aircraft.
      • Main window size.
      • Main window position.
      • Main window view.
  • Aircraft override:
    • When loading a Continuous recording at startup, we override the aircraft and starting airport to match what is in the recording.
  • Replay of Continuous recordings from URL:
    • Extends the --load-tape command-line option, for example: --load-tape=


  • A recovery snapshot is actually a single-frame continuous recording, and will be called <aircraft-type>-recovery.fgtape.
    • Load on the command line with --load-tape=<aircraft-type>-recovery.
    • Then do Ctrl-R to see the replay dialogue.
    • And click on My Controls.
    • Notes:
      • Some aircraft do not support My Controls.
      • Loading a recovery file from within Flightgear via the Flight Recorder Control dialogue is usually not useful because the recovery file will have been overwritten by the current Flightgear session.
  • Continuous recording to file uncompressed is e.g. 100MB for an hour's recording near EDDF.
  • Support for compression of Continuous recordings was pushed to next on 2021-7-31 (FlightGear commit 7d414886e00e).
  • Replay of Continuous recordings from URL:
    • Downloads to local file in the background while replaying.
    • Reuses local file if present, appending to it in the background if it was a partial download.
    • Local file is in directory specified by property /sim/replay/tape-directory.

For details on recording file formats, see: flightgear/docs-mini/

FG 2.6.0 and later

the flight recorder tapes are only 1 or 2 hours max... at one time i wanted to do one for a cross-country flight but when i saved it i only got the last hour or two

Cquote1.png the "my controls" button is currently intentionally disabled for JSBSim and for YASim helicopters. Only works with YASim aircraft so far.

FG 2.6.0 introduced a new replay system which can be adapted to individual aircraft and provides better recordings/playbacks. It also introduces a new GUI as well as a dedicated file format for serializing flights to disk: Fgtape.

The instant replay dialog.

FG 2.4.0 and earlier

The instant replay dialog for FG2.4.0 and earlier.

For FG 2.4.0 and earlier, a simple dialog box is presented with a couple of options (duration of replay and view type).

  • A value of 0 for duration will replay the entire flight. The default value is 90 seconds (similar to MSFS). If you want something different, just type the number of seconds desired in the text box.
  • The view option is a drop-down box with three options corresponding to Cockpit, Chase and Tower views. No matter what this is initially set to, the view type can be changed as normal with v/V and ctrl-v to cycle forwards or backwards through all the available views or return to default Cockpit view.

To return to normal flight, press 'p' twice (pause/unpause). This returns you to the point where you selected Instant Replay. You cannot back up 30 seconds or so and try that landing again. Also, it is currently not possible to save the replay buffer to a file to load and replay a flight later on.

Note: only data directly related to your aircraft is saved and played back, AI objects, multiplayer aircraft or any random features will not be replayed.

Cquote1.png The replay system uses three buffer levels: short term memory records 60

seconds at full frame rate, mid term buffer records another 10 minutes
at 2fps, and the long term buffer holds 1 hour at 1/5fps. As I stated
earlier, I'm not changing the buffering scheme itself. However, the
buffer durations and rates are exposed by properties now. So, if you had
enough memory, you could increase the buffer sizes or change their rates.

Cquote1.png You should be able to extend the recording limit by changing the /sim/reply/duration property (e.g. by clicking on View -> Instant Replay and changing the duration in the textbox next to the "Loop" checkbox).
— Alessandro Menti (Feb 20th, 2016). Re: [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)

Feature Requests

Cquote1.png If the F/R data was written to disk immediately, so it doesn't have to take up valueable RAM, would make it possible to record nearly indefinitely (depending on disk space). And delete this data like a tmp-file on shutdown, if it isn't stored somewhere else...
— chris (Feb 20th, 2016). [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)
Cquote1.png This should be quite doable, the FlightRecorder code is quite self-contained. Also it uses thining of the history buckets so actually I think for multi-hour data, maybe it just needs a coarser (maybe one sample per 5 seconds?) bucket of larger sie. If you want to look at the code I’m happy provide guidance on enhancing it.
— James Turner (Feb 21st, 2016). Re: [Flightgear-devel] flight recorder time limit.
(powered by Instant-Cquotes)

[Something similar to this is on next - see above.]

Forum topics

Readme file

Source code