{"record":{"id":"ddf19b87486627e8","repo":"langchain-ai/deepagents","slug":"ffmpeg-timed-out-while-converting-path","errorCode":null,"errorMessage":"ffmpeg timed out while converting {path}","messagePattern":"ffmpeg timed out while converting (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/talon/deepagents_talon/speech.py","lineNumber":303,"sourceCode":"                str(path),\n                \"-ar\",\n                \"16000\",\n                \"-ac\",\n                \"1\",\n                \"-f\",\n                \"wav\",\n                str(output),\n            ],\n            capture_output=True,\n            timeout=120,\n            check=False,\n        )\n    except FileNotFoundError as exc:\n        msg = \"ffmpeg not found on PATH; install ffmpeg to enable voice transcription.\"\n        raise RuntimeError(msg) from exc\n    except subprocess.TimeoutExpired as exc:\n        msg = f\"ffmpeg timed out while converting {path}\"\n        raise RuntimeError(msg) from exc\n\n    if proc.returncode != 0:\n        stderr = proc.stderr.decode(\"utf-8\", errors=\"replace\")\n        msg = f\"ffmpeg conversion failed with exit code {proc.returncode}: {stderr}\"\n        raise RuntimeError(msg)\n    return output\n","sourceCodeStart":285,"sourceCodeEnd":310,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/talon/deepagents_talon/speech.py#L285-L310","documentation":"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.","triggerScenarios":"Local transcription of an audio file whose ffmpeg conversion exceeds 120 seconds — typically very large/long recordings or slow/constrained hardware (CPU-starved containers).","commonSituations":"Transcribing hour-long meeting recordings on a small CI container; disk-I/O-bound machines; network-mounted audio files with slow reads.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from tenacity import retry, stop_after_attempt\n@retry(stop=stop_after_attempt(2), retry=retry_if_exception_message(match=\"ffmpeg timed out\"))\ndef convert(path):\n    return transcribe_local(path)","preventionTips":["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"],"tags":["ffmpeg","voice","timeout","performance"],"backgroundTag":"subprocess-timeout","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}