
foojay · 14 min readDeveloper tools & productivity
Driving FFmpeg from Java Without Deadlocks or Broken Files
The article shows how to run FFmpeg from Java without deadlocks by properly handling stderr streams, using virtual threads, and parsing ffprobe JSON with Jackson. It explains common pitfalls, offers three solutions, and demonstrates live progress parsing.
- Read stderr concurrently or redirect to avoid pipe buffer deadlocks
- Use Jackson with SNAKE_CASE to map ffprobe JSON to records
- Parse ffmpeg progress pipe with key=value blocks for real‑time updates