Production-style video ingestion and transcoding pipeline built with Python.
The application downloads videos from external platforms, processes them with FFmpeg, generates thumbnails, and uploads optimized streaming files to an AVideo server — with real-time progress updates streamed to the browser.
- FastAPI backend with async endpoints
- Real-time progress streaming using SSE
- Background worker architecture with thread-safe queues
- FFmpeg transcoding pipeline
- Multi-resolution HLS-ready encoding
- Chunked uploads for large files
- HTTP integrations using
httpx - Typed Python codebase with strict
mypy - Automated CI with GitHub Actions
- Unit tests with
pytest
-
Import videos from:
- YouTube
- Vimeo
- 10,000+ platforms via
yt-dlp - Local files
-
Automatic transcoding with FFmpeg
-
Thumbnail generation:
- JPG
- GIF
- WebP
-
Multi-resolution encoding
-
Chunked uploads
-
Real-time browser progress updates
-
CLI interface
-
Web dashboard
Browser (React + SSE)
│
▼
FastAPI API Server
│
▼
Thread-safe Job Queue
│
▼
Worker Pipeline
├── yt-dlp
├── FFmpeg
└── AVideo API
git clone https://github.com/YPT-ME/Local-Encoder
cd Local-Encoder
python -m venv .venv
source .venv/bin/activate
pip install -e .
local-encoder serveOpen:
http://localhost:8000
pip install -e ".[dev]"
pytest
ruff check .
mypy local_encoder| Area | Technologies |
|---|---|
| Backend | FastAPI, httpx |
| Video Processing | FFmpeg, yt-dlp |
| Frontend | React, Tailwind |
| Testing | pytest |
| Tooling | Ruff, mypy |
| Packaging | Hatchling |
| CI/CD | GitHub Actions |
- Python 3.11+
- FFmpeg + FFprobe — see External Tools below
yt-dlp is a Python package and is installed automatically with
pip install -e .— no manual setup needed.
The application resolves ffmpeg and ffprobe in this order:
| Priority | Method | How |
|---|---|---|
| 1 | Bundled binaries | Place ffmpeg / ffprobe (or .exe on Windows) inside a bin/ folder at the project root |
| 2 | Environment variables | Set FFMPEG_BIN and FFPROBE_BIN in .env |
| 3 | System PATH | Have ffmpeg and ffprobe available globally |
Option A — Standalone (recommended for portability):
Local-Encoder/
└── bin/
├── ffmpeg.exe ← Windows
└── ffprobe.exe
Download static builds from ffmpeg.org/download.html or github.com/BtbN/FFmpeg-Builds.
Extract and copy only ffmpeg and ffprobe into the bin/ folder — no install required.
Option B — Environment variable:
# .env
FFMPEG_BIN=C:/tools/ffmpeg/bin/ffmpeg.exe
FFPROBE_BIN=C:/tools/ffmpeg/bin/ffprobe.exeOption C — System PATH:
Install FFmpeg via your package manager and verify:
ffmpeg -version
ffprobe -versionMIT