Burn subtitles into videos with styling options.
This repository is a small but legitimate FFmpeg-focused MVP. It uses local ffmpeg / ffprobe binaries, keeps defaults conservative, and avoids destructive behavior.
- Purpose-built CLI/service for this repository's use-case
- Safe-by-default workflow and explicit outputs
- Minimal codebase that is easy to extend
- Uses FFmpeg/ffprobe via subprocess or exec wrappers
- FFmpeg and ffprobe in
PATH - Python 3.11+
cd ffmpeg-subtitle-burner
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txtpython3 app.py --helpThis repo includes a compose.yml setup so you can run the tool with FFmpeg and Python already installed inside the container.
- Python 3.11
ffmpegandffprobefrom the Debian package- Project dependencies from
requirements.txt
docker compose builddocker compose run --rm ffmpeg-toolThe default container command prints the tool help, so you can override it with the exact python app.py ... command you want.
docker compose run --rm ffmpeg-tool python app.py /data/input/video.mp4 /data/input/subtitles.srt /data/output/burned.mp4Use ./data, ./output, and ./config as convenient bind mounts for input media, generated output, and JSON/config assets.
Replace the example paths with whatever files you want to process.
- The container image already provides
ffmpeg/ffprobe, so you do not need them installed on the host. - Bind-mounted paths in examples use container paths such as
/data/...and/output/.... - For long-running services, use
docker compose up -danddocker compose logs -f.
- Prefer CLI flags for one-off runs
- Some repos include
config.example.jsonfor future extension - Review paths and outputs before long-running jobs
- Outputs are only written to the files/directories you specify
- Logs go to stdout/stderr unless the tool documents otherwise
- MVP-sized implementation, not a full media platform
- Assumes local FFmpeg availability
- Some advanced workflows are intentionally simplified
- Test against sample media first
- Prefer dry-run mode when available
- Validate input URLs and destination paths before long jobs