Skip to content

DuelingGroks/AE-MotionTrack-Tools

Repository files navigation

AE-MotionTrack-Tools

A lightweight Python toolkit for extracting and analyzing motion tracking data from Adobe After Effects. Converts AE tracking exports to clean CSV files, computes motion metrics like speed and direction, and supports multi-object scene analysis. Built for skywatching, VFX, and motion science workflows.

AE Tracking Data Tools

This repository includes two command-line tools:

  1. Tracking2CSV.py – Converts raw tracking data exported from Adobe After Effects into structured CSV.
  2. AnalyzeCSV.py – Analyzes the output from Tracking2CSV.py, calculating statistics such as frame-to-frame motion, speed, and angle.

Files Overview

File Description
Tracking2CSV.py Parses .txt files exported from AE and outputs CSV with Feature Center, Attach Point, and Confidence.
AnalyzeCSV.py Reads the structured CSV and outputs a new CSV file with derived motion statistics like speed and direction.
ObjectTrackingData.txt Example exported data from Adobe After Effects.
ObjectTrackingTable.csv Output of Tracking2CSV.py, structured AE tracking data.
ObjectTrackingAnalyzed.csv Output of AnalyzeCSV.py, enriched with motion calculations.

Workflow

Step 1: Export Tracking Data from AE

  1. Track the object(s) in your clip using After Effects' motion tracking tools.
  2. Select the desired tracking markers (e.g., Feature Center, Attach Point, Confidence).
  3. Right-click and choose "Copy Selected Keyframes."
  4. Paste the copied data into a .txt file using a plain text editor.

Step 2: Convert AE TXT to CSV

Use Tracking2CSV.py to convert AE export .txt files.

python Tracking2CSV.py ObjectTrackingData.txt ObjectTrackingTable.csv

This will export a file like ObjectTrackingTable.csv with columns:

Frame, Feature X, Feature Y, Attach X, Attach Y, Confidence

Step 3: Analyze Tracking Data

Run AnalyzeCSV.py to compute motion-related stats.

python AnalyzeCSV.py ObjectTrackingTable.csv ObjectTrackingAnalyzed.csv

Output columns will include:

Frame, Feature X, Feature Y, Attach X, Attach Y, Confidence,
Delta X, Delta Y, Distance, Speed (px/s), Angle (deg), Smoothed Speed

Assumptions

  • Frame rate is assumed to be 29.97 FPS (standard AE export default).
  • Tracking2CSV.py detects and aligns multiple tracking marker blocks by frame.
  • Smoothed speed is calculated using a moving average window.

Example Output

A few rows from ObjectTrackingAnalyzed.csv:

Frame Feature X Feature Y Attach X Attach Y Confidence Speed (px/s) Angle (deg)
3656 4388.82 787.5 4385.5 788.1 97.65 195.22 85.02
3657 4389.24 793.02 4386.1 793.3 96.20 168.74 86.19
3658 4387.17 796.66 4384.2 796.7 93.52 110.66 100.72

Future Ideas

  • Integrate camera calibration to map pixels to real-world units.
  • Add jitter suppression or object tracking filters.
  • Visualize motion with graph overlays.

About

A lightweight Python toolkit for extracting and analyzing motion tracking data from Adobe After Effects. Converts AE tracking exports to clean CSV files, computes motion metrics like speed and direction, and supports multi-object scene analysis. Built for skywatching, VFX, and motion science workflows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages