VideoExportOptions
public sealed record VideoExportOptions : IEquatable<VideoExportOptions>
How to write a video.
Every property that is not required has the SDK's own default, so an instance with only VideoExportOptions.OutputPath, VideoExportOptions.Width, VideoExportOptions.Height and VideoExportOptions.FrameRate set writes a Motion JPEG radiometric export.
VideoExportOptions: constructors
public VideoExportOptions()
VideoExportOptions: properties
public int BitrateKbps { get; init; }
Target bitrate in kbit/s, or zero for the encoder's quality mode.
public VideoCodec Codec { get; init; }
Which encoder to use.
public VideoContent Content { get; init; }
What the frames handed over will be.
public float FrameRate { get; init; }
Declared output frame rate in Hz. Required, and must be greater than zero.
Sets the stream's time base as well as the rate the file announces, so it is also the resolution a per-frame timestamp is quantised to.
public int Height { get; init; }
Frame height in pixels. Required. See VideoExportOptions.Width.
public int MjpegQuality { get; init; }
Motion JPEG quality, 2 (best) to 31 (worst), 2 by default. Ignored by every other codec.
public string OutputPath { get; init; }
Where to write. Required.
public bool PaceByArrival { get; init; }
Time each frame by when it arrives rather than by how many came before.
false by default, which is right for an export: a converter feeds a file's frames as fast as it can read them and they belong VideoExportOptions.FrameRate apart however quickly they were handed over.
true for a live take, where frames are passed through from a camera as they come. Without it the file's timeline is the frame count, so it declares itself at VideoExportOptions.FrameRate however fast the frames really arrived: a camera delivering 9 pictures a second into a file that says 32 replays three and a half times too fast, and nothing about the file looks wrong: the pictures are all there, in order.
Overridden per frame by the timestamp argument of VideoExport.WritePicture(…), which is the right answer for exporting a recording and is neither of these two.
public VideoPreset Preset { get; init; }
Encoding speed preset.
public int Width { get; init; }
Frame width in pixels. Required.
For VideoContent.Colorized this is the size of your picture, which need not be the camera's: an application that draws its regions, labels and readings into a larger buffer sets that buffer's size here and those are in the video too.