ass_snap_to_frames
Snap subtitle line start and end times to whole video frames to correct timing drift and match video playback exactly.
Instructions
Snap line start/end times to whole video frames.
Args:
selection: lines to snap.
fps: frame rate (see :func:ass_frame_from_ms).
mode: "nearest" (default), "floor" or "ceil".
doc_id: document id.
which: "both" (default), "start" or "end".
Returns:
{"doc_id", "fps", "fps_source", "mode", "which", "considered", "count", "changes": [{"index", "field", "old_ms", "new_ms", "old", "new", "frame"}], "applied"} — new_ms is what the document now
holds, count is the number of fields that actually moved and
considered the number that were inspected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| mode | No | nearest | |
| which | No | both | |
| doc_id | No | ||
| selection | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||