# PixelMask
**Repository Path**: gdouage/PixelMask
## Basic Information
- **Project Name**: PixelMask
- **Description**: PixelMask — Local Video Mosaic Tool A browser-based utility for applying pixelated censorship (mosaic) to any region of your videos. Draw rectangles on the frame, set active time ranges per region, adjust mosaic intensity, and batch export to MP4/WebM (with optional GIF) — all processed 100% locally, no upload required.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-10-07
- **Last Updated**: 2026-10-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# PixelMask
**Local-first video mosaic (censoring) tool — 100% in your browser, zero upload.**
**本地优先的视频马赛克打码工具 —— 100% 浏览器运行,零上传。**
[](LICENSE)
**English** | [简体中文](README.zh-CN.md)
## ✨ Features
- 🖱️ **Draw to mask** — Drag rectangles directly on the video frame to define mosaic regions
- ⏱️ **Time-scoped regions** — Each region has its own start/end time; leave empty for full duration
- 🎚️ **Adjustable intensity** — Mosaic block size from 6 to 40 px
- 🗂️ **Batch processing** — Load multiple videos, mask them one by one, export all at once
- 🎬 **MP4 / WebM export** — Re-encoded via native `MediaRecorder`, original audio track preserved
- 🖼️ **GIF export** — Built-in GIF encoder with median-cut adaptive palette (no dependencies)
- 🔒 **Privacy by design** — Everything runs locally through Canvas / MediaRecorder / File System Access APIs. Your files never leave your machine.
## 🚀 Quick Start
1. Download `index.html` (this single file is the whole app)
2. Open it in a Chromium-based browser (Chrome / Edge 94+)
3. Pick your videos, draw mask regions, hit **Export**
No build step. No install. No server.
## 📖 Usage
1. **Select videos** — multiple files supported
2. **Draw regions** — hold and drag on the video; each box can be edited afterwards
3. **Fine-tune** — set start/end time per box, adjust mosaic strength
4. **Export** — choose an output folder; each video is exported as `_mosaic.mp4` (plus optional `_mosaic.gif`)
## ⚠️ Notes
- Requires a browser supporting the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) (Chrome/Edge)
- MP4 output depends on browser codec support; WebM is used as fallback
- GIF export samples at 5 fps, scaled to 360px width to control file size
## 🛠️ Tech
Single-file vanilla HTML/JS. No frameworks, no build tools, no external dependencies.
| API | Purpose |
|---|---|
| `Canvas 2D` | Frame drawing + mosaic effect (downscale/upscale trick) |
| `MediaRecorder` | Video re-encoding with audio |
| `File System Access` | Folder picker & direct file writing |
| Custom LZW + median-cut | Dependency-free GIF encoder |
## 📄 License
MIT