Python toolkit for programmatically manipulating Camtasia project files
Project description
Camtasio
A modern Python API and CLI for programmatically working with Camtasia projects.
Overview
Camtasio provides a comprehensive toolkit for manipulating Camtasia project files (.cmproj directories containing .tscproj JSON files). It combines high-level object-oriented APIs with powerful low-level JSON manipulation capabilities for complete control over Camtasia projects.
Key Features
- 📁 Project Management: Read, modify, and save Camtasia projects (.tscproj files)
- 🎬 Timeline Operations: List tracks, analyze clips, and manage markers
- 📐 Spatial Scaling: Resize projects to different resolutions (
xyscale) - ⏱️ Temporal Scaling: Change playback speed with audio preservation (
timescale) - 📁 Media Management: List, clean, and replace media files (
media-ls,media-rm,media-replace) - 🎯 Batch Processing: Apply operations across multiple projects (
batch) - 🔧 Rich CLI Tools: Command-line interface with beautiful terminal output
- 📊 Project Analysis: Detailed statistics, complexity scoring, and recommendations
- ✅ Version Compatibility: Support for Camtasia 2018-2025+ (v1.0-v9.0)
Installation
pip install camtasio
For development:
git clone https://github.com/yourusername/camtasio.git
cd camtasio
uv venv
uv sync
Quick Start
Command Line Interface
# Get project information
camtasio info my_project.tscproj --detailed
# Scale project spatially by 1.5x
camtasio xyscale my_project.tscproj 1.5 scaled_project.tscproj
# Scale timeline temporally (double speed)
camtasio timescale my_project.tscproj 2.0 fast_project.tscproj
# List and clean media
camtasio media_ls my_project.tscproj --detailed
camtasio media_rm my_project.tscproj # Remove unused media
# Batch process multiple projects
camtasio batch "projects/*.tscproj" info --detailed
# List timeline tracks and markers
camtasio track_ls my_project.tscproj --detailed
camtasio marker_ls my_project.tscproj
# Generate comprehensive analysis report
camtasio analyze my_project.tscproj
Python API
from camtasio.serialization import ProjectLoader, ProjectSaver
from camtasio.transforms.engine import PropertyTransformer, TransformConfig, TransformType
# Load a project
loader = ProjectLoader()
project_data = loader.load("my_project.tscproj")
# Scale spatially using transform engine
config = TransformConfig(TransformType.SPATIAL, factor=1.5)
transformer = PropertyTransformer(config)
scaled_data = transformer.transform_dict(project_data)
# Save result
saver = ProjectSaver()
saver.save_dict(scaled_data, "scaled_project.tscproj")
Available Commands
| Command | Description | Example |
|---|---|---|
info |
Show project information and statistics | camtasio info project.tscproj --detailed |
validate |
Check project integrity | camtasio validate project.tscproj |
xyscale |
Scale project dimensions | camtasio xyscale project.tscproj 1.5 |
timescale |
Scale timeline duration | camtasio timescale project.tscproj 0.5 |
media_ls |
List media bin contents | camtasio media_ls project.tscproj --detailed |
media_rm |
Remove unused media | camtasio media_rm project.tscproj |
media_replace |
Replace media paths | camtasio media_replace project.tscproj old.mp4 new.mp4 |
track_ls |
List timeline tracks | camtasio track_ls project.tscproj --detailed |
marker_ls |
List timeline markers | camtasio marker_ls project.tscproj |
analyze |
Generate analysis report | camtasio analyze project.tscproj |
batch |
Process multiple files | camtasio batch "*.tscproj" info |
version |
Show version info | camtasio version |
Project Structure
A Camtasia project (.cmproj) is a directory containing:
project.tscproj- Main JSON project filemedia/- Imported media files- macOS metadata files (bookmarks.plist, docPrefs)
The .tscproj file contains:
- Canvas dimensions and frame rate
- Source media bin with imported files
- Timeline with scenes, tracks, and clips
- Effects and annotations
Advanced Usage
Spatial Scaling
Resize projects while maintaining relative positions and proportions:
from camtasio import Project
project = Project("tutorial.cmproj")
# Scale from 1080p to 4K
project.scale(3840, 2160, preserve_aspect_ratio=True)
project.save()
Timeline Manipulation
# Add a new marker
project.timeline.add_marker(time=5.0, value="Important Point")
# Find all video clips
for track in project.timeline.tracks:
for clip in track.clips:
if clip.media_type == "video":
print(f"Video: {clip.name} at {clip.start_time}")
Media Management
# List all media files
for media in project.media_bin:
print(f"{media.name}: {media.path}")
# Check for missing media
missing = project.find_missing_media()
if missing:
print(f"Warning: {len(missing)} files not found")
Architecture
Camtasio provides both high-level and low-level APIs:
- High-Level API: Object-oriented interface with
Project,Timeline,Track, andClipclasses - Low-Level API: Direct JSON manipulation for advanced operations
- Domain Models: Structured representations of project components
- Operations Engine: Recursive traversal for complex transformations
Compatibility
- ✅ Camtasia 2018-2025+: Full support for v1.0-v9.0 formats
- ✅ Cross-platform: Windows, macOS, Linux
- ✅ Python 3.11+: Modern Python with type hints
- ✅ Format versions: v1.0, v4.0, v9.0 and future versions
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
MIT License - see LICENSE file for details.
Acknowledgments
Built with modern Python tooling:
- 📦
uvandhatchfor packaging - 🔍
rufffor linting and formatting - 🧪
pytestfor testing - 🎨
richfor beautiful CLI output - 📝
logurufor structured logging
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file camtasio-2025.0.6.tar.gz.
File metadata
- Download URL: camtasio-2025.0.6.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957b08b84e60d826866f1e877e73c7050b5a56aba7a57048161d298f5e2af3f5
|
|
| MD5 |
fcd7e4792919c6243553d501e698ed89
|
|
| BLAKE2b-256 |
27c573c19a50453bc6ea73fe204fe5db72d355acfa051a17e53066c29744f7c4
|
File details
Details for the file camtasio-2025.0.6-py3-none-any.whl.
File metadata
- Download URL: camtasio-2025.0.6-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aef05dc1eedf0461a9c15b13fa30e08b4d236b7020ea040772e4954be683e58
|
|
| MD5 |
1c6a9df1fd471f0029fb25448a1e445e
|
|
| BLAKE2b-256 |
e1b8bf77cc7fada1a24bbb6b2716616ff68a2d29ef58c833b0f36d451ee2cec5
|