OpenCV VideoCapture and imwrite missing timezone support for timestamps
26K reputation · 24 Jul 2022, 17:45 UTC
The goal is to obtain frame timestamps that reflect absolute civil time with a specific regional time‑zone offset when capturing video or writing images.
Currently, OpenCV’s VideoCapture::get(CAP_PROP_POS_MSEC) returns only elapsed milliseconds since stream start and provides no wall‑clock or timezone information, while imwrite discards any existing EXIF DateTimeOriginal field and does not embed a timezone offset, leaving the timestamp ambiguous.
Given the absence of an API to attach or interpret a time‑zone to these timestamps, what strategies can be used to associate a known zone with frame data without modifying the library?
- How can a specific time zone be reliably associated with timestamps obtained from
VideoCapture? - Is there a method to preserve or inject timezone‑aware EXIF
DateTimeOriginalwhen usingimwrite? - Are there any planned extensions to OpenCV that would expose timezone‑aware timestamp APIs?