# Depth Studio

> Launch and operate Depth Studio, a local web app powered by the official Video-Depth-Anything Small relative-depth model. Use when a user wants to convert uploaded videos into temporally consistent grayscale depth videos, preview source and depth side by side, split processing and downloads at a chosen duration, invert depth polarity, or download a browser-compatible MP4 or segmented MP4 ZIP on Windows or macOS.

- Skill: `toolsai/depth-studio` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add toolsai/depth-studio`
- Raw SKILL.md: https://api.skillmd.com/api/skills/toolsai/depth-studio/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: toolsai (https://skillmd.com/u/toolsai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/toolsai/depth-studio

---


# Depth Studio

Launch the bundled local web application and keep its server running while the user works.

## Launch workflow

1. Resolve this skill directory and run `python scripts/launch.py --browser none` from it.
2. If setup is incomplete, run `python scripts/setup.py`, then retry the launch command.
3. Wait until the launcher prints a `READY` URL.
4. In Codex Desktop, open that URL with the in-app browser capability.
5. In another agent environment, rerun `python scripts/launch.py --browser system` to use the default browser.
6. The launcher detaches the local server after it prints `READY`; do not keep a terminal tool call open just to preserve the server.
7. Report the URL and any setup or hardware warning plainly. Leave the server running unless the user explicitly asks to close it.

## Operating rules

- Use only the official `Video-Depth-Anything-Small` relative-depth checkpoint.
- Do not substitute a single-frame model or synthetic depth effect.
- Keep inference at a maximum source-frame edge of 1280 px and model input size 518.
- Preserve source FPS, frame count, duration, and aspect ratio in the depth output.
- Display both preview players at the source aspect ratio.
- Keep play, pause, seeking, and playback rate linked with low-frequency soft drift correction; never seek on every animation frame.
- Let the user switch linked playback off when independent decoding is more stable on lower-end hardware.
- Normalize every frame with one full-video depth range; never normalize per frame.
- Default to near-white/far-black. Apply inversion only when requested.
- Use the split length for both memory-bounded inference chunks and download segmentation.
- Cap every inference chunk at 300 frames even when split length is zero, so long videos never load into memory as one sequence.
- Always show one continuous full-length preview. When split length is greater than zero, download a ZIP of sequential MP4 parts; when it is zero, download the full MP4.
- Derive every download part from the single globally normalized output; never normalize each part independently.
- Create download parts on exact frame boundaries. If source keyframes do not align, re-encode the completed preview once with a closed GOP instead of failing the completed job.
- Delete job uploads, raw depth arrays, and partial encodes after success or failure.
- Let the user stop the detached local service only through the page's confirmed Close app control.
- Keep persistent server errors in `runtime/logs/server.log` so unexpected exits can be diagnosed after the launcher closes.

## Files

- Let non-technical macOS users double-click `install-and-launch.command`.
- Let non-technical Windows users double-click `install-and-launch.bat`, which runs the PowerShell environment check.
- If Python is missing, direct the user only to the official Python 3.12 download page, then ask them to rerun the launcher.
- Run environment installation and official model download with `scripts/setup.py`.
- Start the local server with `scripts/launch.py`.
- The launcher must reuse an existing Depth Studio across ports 8765–8784 before starting another instance.
- Verify media timing with `scripts/verify_output.py`.
- Read `README.md` for platform requirements and troubleshooting.

