Thank you for reaching out.
Currently, CameraX does not provide a high-level
Timelapse recording directly within the
VideoCapture or
Recorder APIs. There is no immediate timeline for an official timelapse feature. You can file a formal feature request on the
Public Issue Tracker to help us prioritize this.
Conceptually, to achieve timelapse recording is to build a custom pipeline using
ImageAnalysis +
MediaCodec +
MediaMuxer.
The high-level concept involves three main steps:
1.
Frame Sampling: Use
ImageAnalysis to receive frames and drop those that do not fall within your desired interval (e.g., capture 1 frame every 1s for a 30x speed-up at 30 FPS playback).
2. Time Scaling: Manually calculate the Presentation Timestamp (PTS) for the MediaCodec input buffers. To the encoder, you present frames at a constant 30 FPS rate, regardless of when they were actually captured.
3.
Encoding & Muxing: Pass the sampled YUV data from
ImageProxy into a
MediaCodec encoder and write the output to a
MediaMuxer.
We hope this clarifies the current state and provides a viable path for the implementation
Tomáš Válek 在 2025年12月18日 星期四下午6:50:44 [UTC+8] 的信中寫道: