Clipcutter: local computer vision to batch-crop photos and videos
Clipcutter is a local tool with two modules: one detects, deskews and batch-crops photos scanned together on A4 pages; the other cuts several ranges out of a video with FFmpeg. Everything runs on the user's machine — no file leaves the computer.
Client and context
Scanning family albums or archives yields PDFs with several crooked photos per page, and separating each one by hand takes hours. Cutting video clips usually takes heavy editors or online services.
The problem
“I have dozens of pages with several photos each and I want every photo separate, straight and the same size — without uploading anything.”
Constraints
- Nothing can leave the machine.
- No Electron and no front-end build step.
- FFmpeg errors must show as they are, not as a generic message.
Decisions and trade-offs
Browser UI + local server (FastAPI)
Why: Uses the browser people already have, without the weight of an Electron app; the only traffic is between the tab and localhost.
OpenCV detection tunable on screen
Why: Pages rendered at 300 DPI; minimum size, blur and separation are UI controls, and detection reruns automatically.
Two video cut modes
Why: Fast cut (stream copy, near-instant) or precise cut (re-encode, frame-accurate), with the trade-off explained on screen.
What we built
- Photo extractor: detection, deskew, crop, resize and ZIP export.
- Manual correction: delete false positives and draw regions the detector missed.
- Video cutter: multiple ranges on the timeline, export with per-clip progress.
- Automated tests for both services.
Results
- 300 DPIpage rendering before detectionSource: Project README
- 0files sent off the machineSource: Project architecture
This case's tile
Non-blank lines of code in each project layer.
| Clipcutter lines of code by layer | lines |
|---|---|
| Interface (JS, CSS, HTML) | 1,329 |
| HTTP routes | 394 |
| Services (vision and video) | 303 |
| Tests | 151 |
| Data models | 82 |
Source: Clipcutter repository · 2026-10-13
Technologies
Want something at this level?
Send the problem, not a spec.