# Aja Motion Pipeline Documentation

Aja is a comprehensive video-to-animation pipeline that extracts motion data
from video sources and converts it into industry-standard animation formats.

## Documentation Overview

### Getting Started

- [Quick Start Guide](./guides/quickstart.md) - Get up and running in 5 minutes
- [Installation](./guides/installation.md) - Detailed installation instructions
- [Configuration](./guides/configuration.md) - Pipeline configuration options

### API Reference

- [TypeScript SDK](./api/sdk.md) - Complete SDK reference
- [REST API](./api/rest.md) - HTTP API endpoints
- [CLI Reference](./api/cli.md) - Command-line interface documentation
- [Types Reference](./api/types.md) - Type definitions and interfaces

### Integration Guides

- [React Integration](./integration/react.md) - Using Aja in React applications
- [Node.js Integration](./integration/nodejs.md) - Server-side integration
- [Unity Integration](./integration/unity.md) - Exporting to Unity projects
- [Unreal Integration](./integration/unreal.md) - Exporting to Unreal Engine
- [Blender Integration](./integration/blender.md) - Using with Blender

### Best Practices

- [Video Recording Guidelines](./best-practices/video-recording.md)
- [Performance Optimization](./best-practices/performance.md)
- [Error Handling](./best-practices/error-handling.md)
- [Quality Assurance](./best-practices/quality.md)

### Examples

- [Basic Examples](./examples/basic.md) - Simple usage patterns
- [Advanced Workflows](./examples/advanced.md) - Complex processing scenarios
- [Batch Processing](./examples/batch.md) - Processing multiple videos

## Architecture

The Aja Motion Pipeline consists of several key components:

```
┌─────────────────────────────────────────────────────────────────┐
│                      Client Applications                         │
│  (TypeScript SDK, CLI, REST API, Unity Plugin, Blender Addon)   │
└─────────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                      Motion Pipeline API                         │
│  (Job Management, Configuration, Health Monitoring)             │
└─────────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                      Processing Pipeline                         │
│                                                                  │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐        │
│  │  Video   │→ │  2D Pose │→ │  3D Pose │→ │ Motion   │        │
│  │  Decode  │  │Estimation│  │  Lifting │  │ Smoothing│        │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘        │
│                                                                  │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐        │
│  │ Skeleton │→ │ Retarget │→ │  Format  │→ │  Export  │        │
│  │ Mapping  │  │          │  │ Convert  │  │          │        │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘        │
└─────────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                         Output Formats                           │
│  BVH | FBX | GLB/glTF | USD/USDA/USDC | Alembic | C3D | TRC    │
└─────────────────────────────────────────────────────────────────┘
```

## Supported Formats

### Input Formats

- Video: MP4, MOV, AVI, MKV, WebM
- Motion Capture: BVH, FBX, C3D

### Output Formats

- **BVH** - Biovision Hierarchy (text format, widely compatible)
- **FBX** - Autodesk FBX (binary, includes mesh support)
- **GLB/glTF** - GL Transmission Format (web-optimized)
- **USD/USDA/USDC** - Universal Scene Description (Pixar format)
- **Alembic** - Geometry cache format
- **C3D** - Motion capture data
- **TRC** - Motion Analysis marker format

## Supported Skeleton Templates

| Template  | Joints | Description                |
| --------- | ------ | -------------------------- |
| mixamo    | 65     | Mixamo standard with hands |
| unity     | 54     | Unity Humanoid skeleton    |
| unreal    | 72     | Unreal Engine Mannequin    |
| h36m      | 17     | Human3.6M dataset skeleton |
| coco      | 17     | COCO keypoint format       |
| mediapipe | 33     | MediaPipe Pose landmarks   |
| openpose  | 25     | OpenPose Body_25           |
| smpl      | 24     | SMPL body model            |
| smplx     | 55     | SMPL-X with hands and face |

## Domain-Specific Pipelines

Aja includes specialized pipelines optimized for different motion types:

- **General** - All-purpose motion capture
- **Yoga** - Optimized for yoga poses and slow movements
- **Fitness** - Exercise and workout motion tracking
- **Dance** - Fast movements and complex choreography
- **Martial Arts** - Combat sports and martial arts
- **Sports** - Athletic motion analysis

## Quality Presets

| Preset   | Speed     | Quality   | Use Case                    |
| -------- | --------- | --------- | --------------------------- |
| draft    | Very Fast | Lower     | Quick previews, prototyping |
| standard | Fast      | Good      | General production use      |
| high     | Moderate  | Very Good | Professional productions    |
| ultra    | Slow      | Best      | Feature films, VFX          |

## License

This documentation is part of the Oshun project. See the main repository for
license information.
