langchain-ai/deepagents · error · RuntimeError
ffmpeg timed out while converting {path}
Error message
ffmpeg timed out while converting {path} What it means
ffmpeg conversion of the input audio to WAV is wrapped with a 120-second timeout. If `subprocess.run` raises TimeoutExpired, `_convert_to_wav` raises this RuntimeError naming the input file, aborting transcription for that file.
Source
Thrown at libs/talon/deepagents_talon/speech.py:303
str(path),
"-ar",
"16000",
"-ac",
"1",
"-f",
"wav",
str(output),
],
capture_output=True,
timeout=120,
check=False,
)
except FileNotFoundError as exc:
msg = "ffmpeg not found on PATH; install ffmpeg to enable voice transcription."
raise RuntimeError(msg) from exc
except subprocess.TimeoutExpired as exc:
msg = f"ffmpeg timed out while converting {path}"
raise RuntimeError(msg) from exc
if proc.returncode != 0:
stderr = proc.stderr.decode("utf-8", errors="replace")
msg = f"ffmpeg conversion failed with exit code {proc.returncode}: {stderr}"
raise RuntimeError(msg)
return output
View on GitHub (pinned to a1af029e6e)
Solutions
- Pre-convert long audio to a smaller format (e.g. 16 kHz mono mp3/opus) before transcription, or split into chunks
- Run transcription on hardware with more CPU/IO headroom
- Avoid network-mounted input; copy the file locally first
Defensive patterns
Strategy: retry
Try / catch
from tenacity import retry, stop_after_attempt
@retry(stop=stop_after_attempt(2), retry=retry_if_exception_message(match="ffmpeg timed out"))
def convert(path):
return transcribe_local(path) Prevention
- Pre-trim or chunk audio longer than ~30-60 minutes before transcription
- Run transcription on nodes with adequate CPU and local (non-network) disk
- Monitor conversion duration and raise an alert before the 120s timeout is common
When it happens
Trigger: Local transcription of an audio file whose ffmpeg conversion exceeds 120 seconds — typically very large/long recordings or slow/constrained hardware (CPU-starved containers).
Common situations: Transcribing hour-long meeting recordings on a small CI container; disk-I/O-bound machines; network-mounted audio files with slow reads.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Video decoding exceeded the {MAX_VIDEO_DECODE_SECONDS:.1f}s
- ffmpeg not found on PATH; install ffmpeg to enable voice tra
- ffmpeg conversion failed with exit code {proc.returncode}: {
- {name} must be a positive finite number, got {budget!r}
- Server did not become healthy within {timeout}s
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/ddf19b87486627e8.
Report an issue: GitHub.