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"}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ass_frame_from_ms"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ms | No | ||
| fps | No | ||
| doc_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||