Metadata-Version: 2.4
Name: minicut
Version: 0.1.1
Summary: Local browser app for dataset video trimming and cropping
Author: Minicut
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.116.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: uvicorn>=0.31.0
Description-Content-Type: text/markdown

# Minicut

Minicut is a local-first browser app for dataset preprocessing.
It helps you trim and crop videos in your browser while keeping original files untouched.

## What You Can Do

- Browse videos from a workspace folder.
- Trim by start time + duration (seconds or frames).
- Crop with an interactive on-video rectangle (draw, move, resize).
- Set output FPS (default 24).
- Preview trim range before processing.
- Process videos and keep originals unchanged.
- Review processed outputs (preview, open file, delete).
- See useful stats like duration, FPS, resolution, codec, size, and timestamps.

## Requirements

- Python 3.11+
- ffmpeg on PATH
- ffprobe on PATH
- uv package manager

## Quick Start

```bash
uvx minicut
```

See all available options:

```bash
uvx minicut --help
```

By default Minicut uses:

- workspace: current directory
- output folder: `processed`
- host: `127.0.0.1`
- port: `8765`

## How To Use

1. Launch Minicut and open your workspace videos.
2. Select a video from the Workspace Videos list.
3. Set trim mode and values:
   - Seconds mode: begin second + duration seconds
   - Frames mode: begin second + duration frames (at output FPS)
4. Adjust crop rectangle on top of the video preview.
5. Optionally use preview controls to check the selected trim range.
6. Click Run Trim + Crop.
7. Review outputs in Processed Videos:
   - Preview in-app
   - Open file directly
   - Delete if needed

## Output Behavior

- Original files are never overwritten.
- Output files are written under the output folder in your workspace (default: `processed`).
- Output naming is collision-safe:
  - `<stem>_processed.mp4`
  - `<stem>_processed_1.mp4`
  - `<stem>_processed_2.mp4`
  - ...

## Troubleshooting

If Minicut fails to start:

- Verify `ffmpeg` is installed and on PATH.
- Verify `ffprobe` is installed and on PATH.
- Check that your workspace path exists and is readable.
- Check that the output folder is writable.

If processing fails:

- Confirm trim duration is positive and inside video duration.
- Confirm crop rectangle stays within video bounds.

## Notes

- Workspace scanning is currently non-recursive.
- Job state is in-memory; active jobs are not persisted across app restart.

