Time arithmetic for MLT in/out/length attributes.
MLT accepts two time vocabularies: frame counts ("150") and clock strings ("HH:MM:SS.mmm"). Conversion between them needs the profile's fps, carried here as a [num den] fraction (a bare number means [n 1]).
Portable: core + string only, integer math where hosts disagree on rounding.
Time arithmetic for MLT in/out/length attributes.
MLT accepts two time vocabularies: frame counts ("150") and clock strings
("HH:MM:SS.mmm"). Conversion between them needs the profile's fps, carried
here as a [num den] fraction (a bare number means [n 1]).
Portable: core + string only, integer math where hosts disagree on rounding.(clock->frames s fps)Clock string to frame count at fps. A bare integer string is already a
frame count and passes through.
Clock string to frame count at `fps`. A bare integer string is already a frame count and passes through.
(clock->millis s)Parse "HH:MM:SS.mmm" (hours and millis optional: "MM:SS", "SS.mmm") to milliseconds. Returns nil for malformed input.
Parse "HH:MM:SS.mmm" (hours and millis optional: "MM:SS", "SS.mmm") to milliseconds. Returns nil for malformed input.
(duration in out fps)Frame length of the cut [in out] (inclusive, MLT-style). Ends may be frame
counts or clock strings; both must resolve at fps.
Frame length of the cut [in out] (inclusive, MLT-style). Ends may be frame counts or clock strings; both must resolve at `fps`.
(fps-pair fps)Normalize fps to [num den]: [30000 1001] stays, 25 -> [25 1], 29.97 rounds into x/1001 form.
Normalize fps to [num den]: [30000 1001] stays, 25 -> [25 1], 29.97 rounds into x/1001 form.
(frames->clock n fps)Frame count to "HH:MM:SS.mmm" at fps.
Frame count to "HH:MM:SS.mmm" at `fps`.
(frames->millis n fps)Milliseconds spanned by n frames at fps.
Milliseconds spanned by `n` frames at `fps`.
(millis->clock ms)Format milliseconds as "HH:MM:SS.mmm".
Format milliseconds as "HH:MM:SS.mmm".
(millis->frames ms fps)Frames spanned by ms milliseconds at fps.
Frames spanned by `ms` milliseconds at `fps`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |