OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

VideoMetadata

pub struct VideoMetadata

What a video file says about itself, for VideoExport::create_with_metadata.

The standard fields land where Windows Explorer and the common players read them. In an MP4 file title is Explorer's Title, comment its Comments and creation_time its Media created, and software is the encoding tool; in an MKV or WebM file they are the segment title, a COMMENT tag, the date and the writing application.

custom pairs are written as they are: in an MP4 file as iTunes free-form tags, which ffprobe and MediaInfo list under their key; in an MKV or WebM file as tags, whose names Matroska stores in capitals, so com.optris.camera.serial reads back as COM.OPTRIS.CAMERA.SERIAL.

Nothing is dropped. What cannot be written is refused with Status::InvalidArgument and no file is created: metadata for any other container than MP4, MKV or WebM, an empty key, a key with a control character, a key that repeats another one whatever its capitalisation, and a key that names a standard field (title, comment, creation_time, encoding_tool, encoder). An empty field is not written.

Built from VideoMetadata::default, field by field, so that a field added later does not break your code.

VideoMetadata — fields

title: String

The title.

comment: String

Free text: a comment or a description.

creation_time: Option<std::time::SystemTime>

When the recording was made, which for an export is not when the export was made. Written in UTC; an MP4 file stores whole seconds.

software: String

The program that made the video, with its version, for example "Optris Connect 2.1.0". Written as the encoding tool, followed by the SDK's own name and version.

custom: Vec<(String, String)>

Your own keys and values, in this order.