VideoMetadata
class optris_sdk.video.VideoMetadata
What a video file says about itself, for
VideoExport.create.
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 by
VideoExport.create with
optris_sdk.errors.InvalidArgumentError, 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).
- Attribute
title— the title, orNone. - Attribute
comment— free text, a comment or a description, orNone. - Attribute
creation_time— when the recording was made, which for an export is not when the export was made, as adatetime.datetime, orNone. A naive one is local time, asdatetime.datetime.timestampreads it. Written in UTC; an MP4 file stores whole seconds. - Attribute
software— the program that made the video, with its version, for example'Optris Connect 2.1.0', orNone. Written as the encoding tool, followed by the SDK's own name and version. - Attribute
custom— your own keys and values, as a dict or as a sequence of(key, value)pairs, in this order.