Markers

Timeline and per-media markers (table-of-contents keyframes).

class camtasia.timeline.markers.Marker(name, time)[source]

Bases: object

A single marker (TOC keyframe).

Parameters:
  • name (str) – The marker label text.

  • time (int) – Position in editRate ticks.

name: str
time: int
property time_seconds: float

Position in seconds.

class camtasia.timeline.markers.MarkerList(data)[source]

Bases: object

Wraps a parameters dict that may contain toc keyframes.

Handles the case where the parameters/toc/keyframes path doesn’t exist yet — it is created on first add.

Parameters:

data (dict[str, Any]) – The parent dict containing a ‘parameters’ key (e.g. the timeline dict or a media dict).

add(name, time_ticks)[source]

Add a marker at the given time.

Parameters:
  • name (str) – The marker label text.

  • time_ticks (int) – Position in editRate ticks.

Return type:

Marker

Returns:

The newly created Marker.

remove_at(time)[source]

Remove all markers at the given time.

Parameters:

time (int) – Position in editRate ticks.

Raises:

KeyError – No marker exists at the given time.

Return type:

None

clear()[source]

Remove all markers.

Return type:

None

replace(markers)[source]

Replace all markers with a new set.

Parameters:

markers (list[tuple[str, int]]) – List of (name, time_ticks) tuples.

Return type:

None