| title | Video Codex |
|---|---|
| emoji | π |
| colorFrom | gray |
| colorTo | yellow |
| sdk | docker |
| pinned | false |
| app_port | 7860 |
The Video Codec Studio handles media compression, transcoding, and encryption. It pairs a custom Rust core engine with a Next.js workspace to run H.265 transcoding, Zstd compression, and ChaCha20-Poly1305 authenticated encryption, all from one interface. All processing is CPU-bound β there is no GPU acceleration.
- β‘ Rust Compression Engine: A compiled CLI engine (
video-codec) using thezstdcrate at levels 11-22 depending on the selected profile. No unsafe code; failures return errors instead of panicking. - π₯ Real H.265 Lossy Transcoding: An
fluent-ffmpegpipeline transcodes withlibx265, mapping the UI's quality slider to a continuous CRF range (18-35) before Zstd wraps the result. - π Real Encryption: Video bitstreams can be sealed with ChaCha20-Poly1305 authenticated encryption. Keys are derived per-file with Argon2id (64MB memory, 3 passes).
- π€ Obsidian UI: A dark, "clinical" interface built with React 19, Framer Motion, and Tailwind CSS v4. Status readouts reflect the actual pipeline in use β no simulated hardware stats.
- π³ Cloud-Native Architecture: Fully Dockerized with multi-stage builds. Deploys to platforms like Hugging Face Spaces.
The studio operates on a bifurcated architecture, handing off intensive computation to native binaries while managing the session via Node.js.
graph TD
A[Obsidian UI] -->|Upload Video & Params| B(Next.js API Route)
B --> C{Profile Selection}
C -->|H.265 Lossy| D[Native FFmpeg libx265]
C -->|Binary / Max Compression| E[Direct Flow]
D --> F[Rust Core Engine]
E --> F
F --> G{Encryption?}
G -->|Yes: ChaCha20-Poly1305/Argon2id| H[Encrypted Output]
G -->|No| I[Standard Output]
H --> J[Client Download]
I --> J
- Framework: Next.js 16 (App Router) / React 19
- Styling: Tailwind CSS v4, Vanilla CSS Design Tokens
- Animation: Framer Motion
- Icons: Lucide React
- Server: Node.js (Edge-Compatible Route Handlers)
- Transcoding: Fluent-FFmpeg, FFmpeg-Static
- Containerization: Docker (Debian Bookworm Slim)
- Language: Rust (Edition 2021)
- Compression:
zstd(Levels 11, 22 depending on profile) - Encryption:
chacha20poly1305,argon2,rand - Serialization:
serde,base64
To run the Video Codec Studio on your local machine, you will need Node.js 20+ and Rust/Cargo.
git clone https://github.com/AshishLekhyani/Video-Codex.git
cd Video-CodexThe Next.js API expects the engine to be compiled as a release binary.
cd video-codec
cargo build --release
cd ..npm install
npm run devThe studio will be live at http://localhost:3000.
This project includes a highly optimized, multi-stage Dockerfile designed specifically for seamless cloud deployment (like Hugging Face Spaces free tier).
It automatically handles:
- Compiling the Rust Engine natively.
- Building the Next.js application in
standalonemode. - Installing native Linux
ffmpeginto the final Debian slim runtime.
To deploy to Hugging Face:
Simply create a new Docker Space and push this repository. The Dockerfile exposes port 7860 natively.
This studio is currently live, running the full Rust+FFmpeg pipeline on Hugging Face Spaces: π View Live Demo
This project is licensed under the MIT License. See the LICENSE file for details.