Project

Project loading, saving, and creation for Camtasia .cmproj bundles.

class camtasia.project.Project(file_path, encoding=None)[source]

Bases: object

Main entry-point for interacting with Camtasia projects.

A Camtasia project is a macOS bundle directory (.cmproj) containing a project.tscproj JSON file, media assets, and recordings.

Parameters:
  • file_path (Path) – Path to the .cmproj directory or .tscproj file.

  • encoding (str | None) – Text encoding of the project file.

classmethod load(file_path, encoding=None)[source]

Load a Camtasia project from disk.

Parameters:
  • file_path (str | Path) – Path to the .cmproj directory or .tscproj file.

  • encoding (str | None) – Text encoding of the project file.

Return type:

Project

Returns:

A Project instance.

property history: ChangeHistory

Undo/redo history for this project.

track_changes(description='edit')[source]

Context manager that records a reversible change.

Usage:

with project.track_changes("add intro"):
    track.add_clip(...)

project.undo()  # reverts the block
Return type:

_ChangeTracker

undo()[source]

Undo the most recent tracked change. Returns its description.

Return type:

str

redo()[source]

Redo the most recently undone change. Returns its description.

Return type:

str

property file_path: Path

The full path to the Camtasia project.

property width: int

Canvas width in pixels.

property height: int

Canvas height in pixels.

property title: str

Project title.

property description: str

Project description.

property author: str

Project author.

property target_loudness: float

Target loudness in LUFS for audio normalization.

property frame_rate: int

Video frame rate.

property sample_rate: int

Audio sample rate.

property edit_rate: int

The editing tick rate (ticks per second).

Default is 705,600,000 — divisible by 30fps, 60fps, 44100Hz, 48000Hz.

property version: str

Project format version string.

property authoring_client: AuthoringClient | None

Details about the software used to edit the project.

property media_bin: MediaBin

The project’s media bin (sourceBin).

property media_count: int

Number of media entries in the source bin.

property source_bin_paths: list[str]

List of all source file paths in the media bin.

property timeline: Timeline

The project’s timeline.

property is_empty: bool

Whether the project has no clips on any track.

property empty_tracks: list[Track]

All tracks with no clips.

property track_names: list[str]

Names of all tracks in the project.

property has_screen_recording: bool

Whether the project contains any screen recording clips.

property track_count: int

Number of tracks in the timeline.

clone_track(source_track_name, new_track_name)[source]

Clone a track with all its clips and effects.

Return type:

Track

swap_tracks(track_name_a, track_name_b)[source]

Swap the visual order of two tracks.

Parameters:
  • track_name_a (str) – Name of the first track.

  • track_name_b (str) – Name of the second track.

Raises:

KeyError – If either track name is not found.

Return type:

None

remove_track_by_name(track_name)[source]

Remove the first track with the given name.

Parameters:

track_name (str) – Display name of the track to remove.

Return type:

bool

Returns:

True if a matching track was found and removed, False otherwise.

property clip_count: int

Total number of clips across all tracks.

property total_effect_count: int

Total number of effects across all clips on all tracks.

property has_effects: bool

Whether any clip in the project has effects.

property has_transitions: bool

Whether any track in the project has transitions.

property has_keyframes: bool

Whether any clip in the project has keyframes.

property total_transition_count: int

Total number of transitions across all tracks.

property total_keyframe_count: int

Total keyframes across all clips on all tracks.

property duration_seconds: float

Total project duration in seconds.

property duration_formatted: str

SS string.

Type:

Total duration as MM

property total_duration_formatted: str

MM:SS string.

Returns H:MM:SS when the duration is one hour or more, otherwise M:SS.

Type:

Total duration as HH

property next_available_id: int

Next available clip ID (max existing + 1).

property all_clips: list[tuple[Track, BaseClip]]

All clips across all tracks as (track, clip) tuples, including nested clips.

property all_groups: list[tuple[Track, Group]]

All Group clips across all tracks as (track, group) tuples.

property group_count: int

Number of Group clips across all tracks.

property screen_recording_groups: list[tuple[Track, Group]]

All screen recording Group clips.

clips_between(range_start_seconds, range_end_seconds)[source]

Return all clips across all tracks that fall within the time range.

Return type:

list[tuple[Track, BaseClip]]

property has_audio: bool

Whether the project has any audio clips.

property has_video: bool

Whether the project has any video clips.

find_clips_by_type(clip_type)[source]

Find all clips of a specific type across all tracks.

Return type:

list[tuple[Track, BaseClip]]

find_clips_with_effect(effect_name)[source]

Find all clips that have a specific effect applied.

Return type:

list[tuple[Track, BaseClip]]

find_clips_by_source(source_id)[source]

Find all clips that reference a specific source bin entry.

Return type:

list[tuple[Track, BaseClip]]

replace_all_media(old_source_id, new_source_id)[source]

Replace all references to one media source with another. Returns count.

Return type:

int

property longest_clip: tuple[Track, BaseClip] | None

The longest clip across all tracks, or None if empty.

property shortest_clip: tuple[Track, BaseClip] | None

The shortest clip across all tracks, or None if empty.

property average_clip_duration_seconds: float

Average clip duration across all tracks, or 0.0 if empty.

property effect_summary: dict[str, int]

Count of each effect type across all clips.

property clip_type_summary: dict[str, int]

Count of each clip type across all tracks.

search_clips(*, clip_type=None, min_duration_seconds=None, max_duration_seconds=None, has_effects=None, has_keyframes=None, on_track=None)[source]

Search for clips matching the given criteria.

All criteria are AND-combined. None means ‘any value’.

Return type:

list[tuple[Track, BaseClip]]

classmethod from_template(template_path, output_path)[source]

Create a new project by copying an existing one as a template.

Copies the entire .cmproj bundle to the output path and loads it.

Return type:

Project

classmethod new(output_path, title='Untitled', width=1920, height=1080)[source]

Create a brand new empty project at the given path.

Return type:

Project

classmethod merge_projects(projects, output_path, title='Merged Project')[source]

Merge multiple projects into one by concatenating their timelines.

Each project’s tracks are appended sequentially. Media bins are merged.

Return type:

Project

batch_apply(operation, *, clip_type=None, on_track=None)[source]

Apply an operation to matching clips. Returns count of clips modified.

Return type:

int

replace_media_path(old_path_fragment, new_path_fragment)[source]

Replace a path fragment in all source bin entries. Returns count changed.

Return type:

int

validate()[source]

Check for common project issues.

Return type:

list[ValidationIssue]

Returns:

A list of ValidationIssue instances (may be empty).

validate_schema()[source]

Validate the project data against the Camtasia JSON Schema.

This is a stricter check than validate() — it verifies the project structure matches the schema derived from 93 TechSmith sample projects.

Return type:

list[ValidationIssue]

validate_and_report()[source]

Run validation and return a human-readable report.

Return type:

str

repair()[source]

Remove stale transitions that reference non-existent clips. Returns counts of fixes applied.

Return type:

dict[str, int]

save()[source]

Write the current project state to disk.

Matches Camtasia’s NSJSONSerialization JSON formatting to avoid parser crashes with .trec screen recordings.

Return type:

None

import_media(file_path, **kwargs)[source]

Import a media file into the project’s source bin.

Detects media type from the file extension and passes appropriate defaults so that pymediainfo is not required.

Parameters:
  • file_path (Path | str) – Path to the media file.

  • **kwargs (Any) – Additional overrides forwarded to MediaBin.import_media().

Return type:

Media

Returns:

The newly created Media entry.

Raises:

ValueError – Unknown file extension.

import_shader(shader_path)[source]

Import a .tscshadervid shader with effectDef parsing.

Reads the shader JSON, converts effectDef entries (hex colors to RGBA floats), and sets sourceTracks metadata for Camtasia. Reuses existing media if already imported.

Return type:

Media

import_trec(trec_path)[source]

Import a .trec screen recording with full stream metadata.

Uses pymediainfo to probe the multi-track container and build correct source bin entries with all stream metadata.

Parameters:

trec_path (str | Path) – Path to the .trec file.

Return type:

Media

Returns:

The Media entry.

Raises:

ImportError – pymediainfo not installed.

statistics()[source]

Comprehensive project statistics as a dict.

Return type:

dict[str, Any]

to_markdown_report()[source]

Format project statistics as a markdown document.

Return type:

str

info()[source]

Comprehensive project information dict.

Return type:

dict[str, Any]

health_check()[source]

Run comprehensive project health check.

Returns dict with: - healthy: bool (True if no errors) - errors: list of error messages - warnings: list of warning messages - structural_issues: list from timeline.validate_structure() - statistics: dict from statistics()

Return type:

HealthCheckResult

compact()[source]

Run all cleanup operations and validate.

Removes orphaned media, empty tracks, and validates the result.

Return type:

CompactResult

Returns:

Summary dict with counts of items cleaned.

Raises:

ValueError – If validation finds errors after cleanup.

summary()[source]

Human-readable project summary.

Return type:

str

describe()[source]

Comprehensive human-readable project description.

Return type:

str

total_duration_seconds()[source]

Total timeline duration in seconds.

Return type:

float

Returns:

Duration in seconds, delegated to the timeline.

export_frame(video_path, timestamp_seconds, output_path=None)[source]

Extract a single frame from a video file as a PNG image.

Uses ffmpeg to extract the frame. If output_path is None, saves to the project’s media directory with an auto-generated name.

Parameters:
  • video_path (Path | str) – Path to the video file (.trec, .mp4, etc.)

  • timestamp_seconds (float) – Time position to extract the frame from.

  • output_path (Path | str | None) – Where to save the PNG. Defaults to project media dir.

Return type:

Path

Returns:

Path to the extracted PNG file.

Raises:

RuntimeError – If ffmpeg exits with a non-zero return code.

export_frame_and_import(video_path, timestamp_seconds)[source]

Extract a frame from video and import it into the project media bin.

Parameters:
  • video_path (Path | str) – Path to the video file.

  • timestamp_seconds (float) – Time position to extract the frame from.

Return type:

Media

Returns:

The newly created Media entry.

find_media_by_name(name)[source]

Search the source bin for media whose filename stem matches name.

Parameters:

name (str) – Filename stem to match (case-sensitive).

Return type:

Media | None

Returns:

The first matching Media, or None.

find_media_by_suffix(suffix)[source]

Return all media entries whose source path ends with suffix.

Parameters:

suffix (str) – Extension or suffix to match (e.g. '.png').

Return type:

list[Media]

Returns:

List of matching Media entries.

find_media_by_extension(ext)[source]

Find all media entries with the given file extension.

Return type:

list[Media]

add_gradient_background(duration_seconds, color0=(0.16, 0.16, 0.16, 1.0), color1=(0.0, 0.0, 0.0, 1.0), track_index=1)[source]

Create a gradient shader background on the specified track.

Adds a sourceBin entry for the gradient shader and places a VMFile clip on the given track.

Parameters:
Return type:

Any

Returns:

The created clip.

add_progressive_disclosure(image_file_paths, start_seconds=0.0, per_step_seconds=5.0, fade_in_seconds=0.5, fade_out_seconds=0.0, track_name_prefix='Prog')[source]

Place images on separate tracks for progressive visual accumulation.

Each image gets its own track so all previous images remain visible when a new one appears. Each image fades in and stays visible until the end of the sequence.

Parameters:
  • image_file_paths (list[Path | str]) – Ordered list of image file paths.

  • start_seconds (float) – When the first image appears.

  • per_step_seconds (float) – Time between each image appearing.

  • fade_in_seconds (float) – Fade-in duration for each image.

  • fade_out_seconds (float) – Fade-out duration for the last image (0 = no fade).

  • track_name_prefix (str) – Prefix for auto-generated track names.

Return type:

list[BaseClip]

Returns:

List of placed image clips.

add_four_corner_gradient(shader_path, duration_seconds, track_name='Background')[source]

Import and place a 4-corner animated gradient shader background.

Reuses an existing .tscshadervid source if one is already in the media bin; otherwise imports from shader_path.

Parameters:
  • shader_path (str | Path) – Path to the .tscshadervid shader file.

  • duration_seconds (float) – How long the background clip should last.

  • track_name (str) – Name of the track to place the clip on.

Return type:

BaseClip

Returns:

The created video clip.

add_voiceover_sequence(vo_files, pauses=None, track_name='Audio')[source]

Import voiceover files and place them sequentially on an audio track.

Parameters:
  • vo_files (list[str | Path]) – List of audio file paths to import and place.

  • pauses (dict[str, float] | None) – Optional mapping of filename to seconds of silence to insert after that clip.

  • track_name (str) – Name of the track to place clips on.

Returns:

float, ‘duration’: float, ‘clip’: AMFile}``.

Return type:

dict[str, dict]

add_voiceover_sequence_v2(audio_file_paths, track_name='Voiceover', start_seconds=0.0, gap_seconds=0.0)[source]

Import and place multiple audio files sequentially on a track.

Each audio file is imported into the source bin, its duration is read from the source bin metadata, and the resulting clip is placed end-to-end (with an optional gap) on the named track.

Parameters:
  • audio_file_paths (list[Path | str]) – Paths to audio files to import.

  • track_name (str) – Name of the track to place clips on.

  • start_seconds (float) – Timeline position for the first clip.

  • gap_seconds (float) – Silence gap between consecutive clips.

Return type:

list[BaseClip]

Returns:

The list of placed audio clips.

add_image_sequence(image_file_paths, track_name='Images', start_seconds=0.0, per_image_seconds=5.0, fade_seconds=0.5)[source]

Import and place multiple images sequentially with fade animations.

Each image is imported into the source bin and placed on the named track for the specified duration. Optional fade-in and fade-out animations are applied to each clip.

Parameters:
  • image_file_paths (list[Path | str]) – Paths to image files to import.

  • track_name (str) – Name of the track to place clips on.

  • start_seconds (float) – Timeline position for the first image.

  • per_image_seconds (float) – Display duration per image.

  • fade_seconds (float) – Fade-in and fade-out duration (0 to disable).

Return type:

list[BaseClip]

Returns:

The list of placed image clips.

copy_to(dest_path)[source]

Copy this project to a new location.

Parameters:

dest_path (str | Path) – Destination path for the .cmproj copy.

Return type:

Project

Returns:

The loaded Project at the new location.

export_all(output_dir)[source]

Export project in all available formats.

Creates: report.md, report.json, timeline.json, markers.srt, timeline.edl

Returns dict mapping format name to output path.

Return type:

dict[str, Path]

set_canvas_size(width, height)[source]

Set the project canvas dimensions.

Return type:

None

diff(other)[source]

Compare this project with another and return differences.

Return type:

dict[str, Any]

strip_audio()[source]

Remove all audio clips from all tracks. Returns count removed.

Return type:

int

remove_all_effects()[source]

Remove all effects from all clips. Returns count removed.

Return type:

int

summary_table()[source]

Return a markdown table summarizing all tracks and clips.

Return type:

str

save_with_history()[source]

Save the project and persist undo history to a sidecar file.

Return type:

None

load_history()[source]

Load persisted undo history from the sidecar file.

Return type:

None

diff_from(other)[source]

Return JSON Patch operations showing differences from another project.

Useful for comparing two versions of the same project.

Parameters:

other (Project) – The project to compare against.

Return type:

list[dict[str, Any]]

Returns:

List of RFC 6902 JSON Patch operations.

diff_summary(other)[source]

Human-readable summary of differences from another project.

Return type:

str

to_dict()[source]

Return a deep copy of the project data dict.

Return type:

dict

property media_summary: dict[str, int]

Count of media entries by file extension.

move_all_clips_to_track(source_track_name, target_track_name)[source]

Move all clips from one track to another by name.

Parameters:
  • source_track_name (str) – Name of the track to move clips from.

  • target_track_name (str) – Name of the track to move clips to.

Return type:

int

Returns:

The number of clips moved.

Raises:

KeyError – If either track name is not found.

add_title_card(title_text, start_seconds=0.0, duration_seconds=5.0, track_name='Titles', font_name='Helvetica Neue', font_weight='Bold', font_size=72.0, font_color=(1.0, 1.0, 1.0), fade_seconds=0.5)[source]

Add a text title card to the timeline.

Creates a callout clip on the named track with the given text and styling. Optionally applies fade-in and fade-out transitions.

Parameters:
  • title_text (str) – The text to display on the title card.

  • start_seconds (float) – Timeline position where the title card begins.

  • duration_seconds (float) – How long the title card is visible.

  • track_name (str) – Name of the track to place the title card on.

  • font_name (str) – Font family name.

  • font_weight (str) – Font weight (e.g. ‘Bold’, ‘Regular’).

  • font_size (float) – Font size in points.

  • font_color (tuple[float, float, float]) – RGB color as a tuple of floats in [0.0, 1.0].

  • fade_seconds (float) – Duration of fade-in and fade-out. Pass 0 to skip.

Return type:

BaseClip

Returns:

The created callout clip.

add_background_music(audio_path, volume=0.3, fade_in_seconds=2.0, fade_out_seconds=3.0, track_name='Background Music')[source]

Import and place background music spanning the full timeline.

The audio is placed at the start and trimmed to match the timeline duration. Volume is reduced and fades are applied.

Return type:

BaseClip

apply_to_all_groups(operation)[source]

Apply a callable to every Group clip in the project.

Parameters:

operation (Callable[[Group], Any]) – A callable that accepts a single Group argument.

Return type:

int

Returns:

The number of Group clips the operation was applied to.

mute_all_groups()[source]

Mute every Group clip in the project.

Return type:

int

Returns:

The number of Group clips that were muted.

add_subtitle_track(subtitle_entries, track_name='Subtitles', font_size=36.0, font_color=(1.0, 1.0, 1.0))[source]

Add subtitle text entries to a dedicated track.

Each entry is placed as a callout clip at the specified time and duration. All subtitles share the same font size and color.

Parameters:
  • subtitle_entries (list[tuple[float, float, str]]) – List of (start_seconds, duration_seconds, text) tuples, one per subtitle line.

  • track_name (str) – Name of the track to place subtitles on.

  • font_size (float) – Font size in points for all subtitle clips.

  • font_color (tuple[float, float, float]) – RGB color as a tuple of floats in [0.0, 1.0].

Return type:

list[BaseClip]

Returns:

List of created callout clips in the same order as the input.

add_callout_sequence(callout_entries, track_name='Callouts', font_size=24.0, fade_seconds=0.3)[source]

Add a sequence of timed callout annotations.

Parameters:
  • callout_entries (list[tuple[float, float, str]]) – List of (start_seconds, duration_seconds, text) tuples.

  • track_name (str) – Name of the track to place callouts on.

  • font_size (float) – Font size in points for all callouts.

  • fade_seconds (float) – Fade-in and fade-out duration (0 to disable).

Return type:

list[BaseClip]

Returns:

List of created callout clips.

add_lower_third(title_text, subtitle_text='', start_seconds=0.0, duration_seconds=5.0, track_name='Lower Thirds', fade_seconds=0.5)[source]

Add a lower-third title overlay.

Creates a callout positioned in the lower portion of the frame with title and optional subtitle text.

Return type:

BaseClip

add_section_divider(title_text, at_seconds, duration_seconds=3.0, track_name='Section Dividers', fade_seconds=0.5)[source]

Add a section divider title card at the specified time.

Creates a full-screen text callout that serves as a visual separator between sections of the video.

Return type:

BaseClip

add_end_card(title_text='Thank You', subtitle_text='', duration_seconds=5.0, track_name='End Card', fade_seconds=1.0)[source]

Add an end card at the end of the timeline.

Return type:

BaseClip

add_chapter_markers(chapters)[source]

Add timeline markers at chapter boundaries.

Parameters:

chapters (list[tuple[float, str]]) – List of (time_seconds, chapter_name) tuples.

Return type:

int

Returns:

Number of markers added.

export_project_report(output_path)[source]

Export a comprehensive project report as a markdown file.

Includes: project summary, track listing, clip inventory, effect usage, transition listing, and validation results.

Return type:

Path

apply_template_effects(effect_config)[source]

Apply effects to clips based on their type.

Parameters:

effect_config (dict[str, list[str]]) –

Dict mapping clip types to effect method names. Example: {‘VMFile’: [‘add_drop_shadow’, ‘add_round_corners’],

’IMFile’: [‘add_drop_shadow’]}

Return type:

int

Returns:

Number of effects applied.

apply_color_grade(brightness=0.0, contrast=0.0, saturation=0.0, clip_types=None)[source]

Apply color adjustment to all video/image clips.

Parameters:
  • brightness (float) – Brightness adjustment (-1.0 to 1.0).

  • contrast (float) – Contrast adjustment (-1.0 to 1.0).

  • saturation (float) – Saturation adjustment (-1.0 to 1.0).

  • clip_types (list[str] | None) – Clip types to apply to. Defaults to [‘VMFile’, ‘IMFile’, ‘ScreenVMFile’].

Return type:

int

strip_all_effects()[source]

Remove all effects from all clips. Returns count removed.

Return type:

int

add_zoom_to_region(clip, start_seconds, duration_seconds, scale=2.0, center_x=0.5, center_y=0.5)[source]

Add a zoom-in animation to a clip at a specific time.

Creates scale and translation keyframes that zoom into a region of the clip, hold, then zoom back out.

Return type:

BaseClip

normalize_audio(target_gain=1.0)[source]

Set all audio clips to the same gain level. Returns count adjusted.

Return type:

int

mute_track(track_name)[source]

Mute a track by name. Returns True if found.

Return type:

bool

static convert_audio_to_wav(input_path, output_path=None, sample_rate=48000)[source]

Convert an audio file to PCM WAV format using ffmpeg.

This is recommended before importing audio into Camtasia projects, especially for compressed formats (MP3, AAC) that may have unreliable duration metadata.

Parameters:
  • input_path (str | Path) – Path to the input audio file.

  • output_path (str | Path | None) – Path for the output WAV. If None, replaces the input file extension with .wav.

  • sample_rate (int) – Target sample rate (default 48000 Hz).

Return type:

Path

Returns:

Path to the converted WAV file.

Raises:
import_and_convert_audio(audio_path, sample_rate=48000)[source]

Convert audio to WAV (if needed) and import into the project.

Automatically converts compressed audio formats to PCM WAV before importing to avoid duration metadata issues.

Return type:

Any

build_from_screenplay_file(screenplay_path, audio_dir, track_name='Voiceover', gap_seconds=0.5)[source]

Parse a screenplay file and build the voiceover timeline.

Reads the screenplay markdown, finds matching audio files in audio_dir, and places them sequentially on the timeline.

Parameters:
  • screenplay_path (str | Path) – Path to the screenplay markdown file.

  • audio_dir (str | Path) – Directory containing VO audio files.

  • track_name (str) – Name for the voiceover track.

  • gap_seconds (float) – Gap between VO clips in seconds.

Return type:

dict[str, Any]

Returns:

Dict with ‘clips’ (placed clips), ‘total_duration’ (seconds), ‘sections’ (parsed screenplay sections).

add_watermark(image_path, opacity=0.3, track_name='Watermark')[source]

Add a watermark image that spans the entire timeline.

The image is placed on its own track with reduced opacity.

Return type:

BaseClip

add_countdown(seconds=3, track_name='Countdown', per_number_seconds=1.0)[source]

Add a countdown (3, 2, 1) at the start of the timeline.

Return type:

list[BaseClip]

apply_to_all_clips(operation, clip_filter=None)[source]

Apply an operation to all clips, optionally filtered.

Parameters:
Return type:

int

Returns:

Number of clips the operation was applied to.

for_each_track(operation)[source]

Apply an operation to every track. Returns count.

Return type:

int

solo_track(track_name)[source]

Solo a track by name (mute all others). Returns True if found.

Return type:

bool

remove_orphaned_media()[source]

Remove media bin entries not referenced by any clip.

Return type:

int

Returns:

Number of media entries removed.

health_report()[source]

Generate a comprehensive project health report.

Return type:

str

extract_audio_track(output_path, track_name=None)[source]

Export audio clips from a track as a list of file references.

Returns a text file listing all audio source files on the track. If track_name is None, exports from all tracks.

Return type:

Path

timeline_to_dict()[source]

Export the timeline structure as a clean dict for serialization.

Returns a simplified representation of the timeline suitable for JSON export, debugging, or comparison.

Return type:

dict[str, Any]

clean_inherited_state(preserve_groups=True)[source]

Reset project to a clean state.

Clears all clips (optionally preserving Group clips such as screen recordings), clears timeline markers, and removes orphaned media.

Parameters:

preserve_groups (bool) – If True, keep Group clips (screen recordings).

Return type:

None

camtasia.project.load_project(file_path, encoding=None)[source]

Load a Camtasia project from disk.

Parameters:
  • file_path (str | Path) – Path to the .cmproj directory or .tscproj file.

  • encoding (str | None) – Text encoding of the project file.

Return type:

Project

Returns:

A Project instance.

camtasia.project.use_project(file_path, save_on_exit=True, encoding=None)[source]

Context manager that loads a project and optionally saves on exit.

Saves the project on normal exit if save_on_exit is True. Discards changes on exceptional exit.

Parameters:
  • file_path (str | Path) – Path to the .cmproj directory or .tscproj file.

  • save_on_exit (bool) – Whether to save on normal exit.

  • encoding (str | None) – Text encoding of the project file.

Yields:

A Project instance.

camtasia.project.new_project(file_path)[source]

Create a new, empty Camtasia project at file_path.

Copies the bundled template project to the target path.

Parameters:

file_path (str | Path) – Destination path for the new .cmproj bundle.

Return type:

None