[PlaybackImageProvider] Fine grained playback control
This MR improves the PlaybackImageProvider
by allowing fine-grained controls over the playback speed.
The relevant settings for this are fps
(default: source
) and playback_speed_multiplier
(default: 1.0
).
The defaults mean that whenever a recording is loaded, the PlaybackImageProvider
will try to estimate the source FPS and use that as the FPS of the image provider. The user can adjust this by setting fps
.
Possible values for fps
are: source
(derive source FPS and use that), source*X
or source/X
(derive source FPS and multiply/divide it by X) and X
(set FPS to X). For all of these settings, the playback speed will not be affected. That is, the playback will be in real time regardless of the FPS.
To change the playback speed, the setting playback_speed_multiplier
comes into play. Possible values are positive decimals. The value of this option will be multiplied while playback. So, for example, setting it to 0.5
will play back the recording in slow motion (twice as slow as normal), while setting it to 2.0
will play back the recording twice as fast. Adjusting the playback speed will not affect the FPS of the image provider.
A special case are recordings, where the source FPS cannot be derived (legacy image sequences). Here, the corresponding playback will just assume the FPS to be 30. For cases where this is not correct, the option fps
can be set to source=X
, which will be interpreted as: Assume that the source FPS is X. However, the preferred way is to convert the legacy image sequence into a chunked image sequence or video using the cvtrec
terminal utility tool and adjust the FPS setting there (for example metadata.csv
-> fps
for chunked image sequences).