Skip to main content

Spatial Video Maker

Convert 2D videos to stereoscopic 3D spatial videos for Apple Vision Pro using AI depth estimation. Runs locally on macOS with Apple Silicon Metal acceleration.

Installation

uv tool install spatial-maker

Requirements

  • macOS with Apple Silicon (for Metal acceleration)
  • ffmpeg with VideoToolbox support
  • spatial CLI for MV-HEVC output
brew install ffmpeg spatial

Model Checkpoints

Download Depth Anything V2 checkpoints:

mkdir -p ~/.spatial-maker/checkpoints

# Small (fastest, 24.8M params)
curl -L -o ~/.spatial-maker/checkpoints/depth_anything_v2_vits.pth \
  https://huggingface.co/depth-anything/Depth-Anything-V2-Small/resolve/main/depth_anything_v2_vits.pth

# Base (balanced, 97.5M params)
curl -L -o ~/.spatial-maker/checkpoints/depth_anything_v2_vitb.pth \
  https://huggingface.co/depth-anything/Depth-Anything-V2-Base/resolve/main/depth_anything_v2_vitb.pth

# Large (best quality, 335.3M params)
curl -L -o ~/.spatial-maker/checkpoints/depth_anything_v2_vitl.pth \
  https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth

You only need the model sizes you plan to use. vits (small) is a good default.

Usage

# Single file
spatial-maker video.mp4

# Specify output path
spatial-maker video.mp4 -o output_spatial.mov

# Process all videos in a folder
spatial-maker /path/to/videos/

Options

# Depth model size: vits (fast), vitb (balanced), vitl (best)
spatial-maker video.mp4 --encoder vitl

# 3D intensity in pixels (20-50 recommended)
spatial-maker video.mp4 --max-disparity 40

# Process only first 10 seconds (for testing)
spatial-maker video.mp4 --duration 10

# Skip downscaling (if input is already 1080p@24fps)
spatial-maker video.mp4 --skip-downscale

# Keep intermediate files
spatial-maker video.mp4 --keep-intermediate

# JSON progress output (for GUI integration)
spatial-maker video.mp4 --json-progress

Pipeline

Input 2D Video
    |
[Downscale to 1080p @ 24fps]
    |
[Depth estimation + stereo pair creation (Depth Anything V2 + DIBR)]
    |
[Audio extraction + muxing]
    |
[MV-HEVC spatial video via spatial CLI]
    |
Spatial Video (.mov)

Parameters

Parameter Description Recommended
--encoder Depth model size (vits/vitb/vitl) vits for speed, vitl for quality
--max-disparity 3D intensity in pixels 20-50 for 1080p
--duration Limit processing time (seconds) Use for testing
--skip-downscale Keep original resolution Only if already 1080p
--json-progress Emit JSON progress to stdout For GUI integration

3D Intensity Guide

  • 20-30: Subtle, comfortable for long viewing
  • 30-40: Moderate, good balance
  • 40-50: Strong, more immersive

Development

git clone https://github.com/mrgnw/spatial-maker.git
cd spatial-maker
uv sync
uv run spatial-maker video.mp4

Acknowledgments

License

MIT

Metadata

Release files for spatial-maker 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spatial-maker 0.1.0
File Size Uploaded Provenance Actions
spatial_maker-0.1.0.tar.gz 9.7 kB Without provenance Details for spatial_maker-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spatial-maker 0.1.0
File Interpreter ABI Platform Actions
spatial_maker-0.1.0-py3-none-any.whl Python 3 none any Details for spatial_maker-0.1.0-py3-none-any.whl

Total release size: 21.0 kB

Release files / spatial_maker-0.1.0.tar.gz

Download URL spatial_maker-0.1.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
625d10e7dc17e346dd4f4afbe0975f5d5d2a75cd54bc8faa29b698880b9382d2
BLAKE2b-256 checksum
How to use checksums
fca7f426a9a9487955a717d1f105838987f2f6f4a8dcc51fba385079fa70c4e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Release files / spatial_maker-0.1.0-py3-none-any.whl

Download URL spatial_maker-0.1.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cfd4033d6a3f852ba61495ecaf3dfcb5ec13f1b41d57629696a871102a9cccf
BLAKE2b-256 checksum
How to use checksums
69f1ebefcc19a6d56b722af0f3701c3debb5685805d2bbf1d79a5616d92caecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Security for spatial-maker 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page