ass_frame_from_ms
Convert a time in milliseconds to a frame number using an explicit or derived frame rate. Ideal for aligning subtitles and video frames.
Instructions
Convert a time in milliseconds to a frame number.
Args:
ms: milliseconds (int/float) or a time string.
fps: frame rate; resolution order is fps argument, workspace video
(dict fps or a probed video path), workspace script config,
document FPS in [Script Info], then a ToolError explaining what
is missing.
doc_id: document id (only used as an fps source).
Returns:
{"ms", "seconds", "fps", "fps_source", "frame", "frame_exact", "frame_floor", "frame_ceil"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ms | No | ||
| fps | No | ||
| doc_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||