{"record":{"id":"10b036d33f5b66c6","repo":"soimort/you-get","slug":"no-ffmpeg-found","errorCode":null,"errorMessage":"No ffmpeg found","messagePattern":"No ffmpeg found","errorType":"exception","errorClass":"EnvironmentError","httpStatus":null,"severity":"error","filePath":"src/you_get/processor/ffmpeg.py","lineNumber":300,"sourceCode":"    return True\n\n\ndef ffmpeg_concat_audio_and_video(files, output, ext):\n    print('Merging video and audio parts... ', end=\"\", flush=True)\n    if has_ffmpeg_installed:\n        params = [FFMPEG] + LOGLEVEL\n        params.extend(['-f', 'concat'])\n        params.extend(['-safe', '0'])  # https://stackoverflow.com/questions/38996925/ffmpeg-concat-unsafe-file-name\n        for file in files:\n            if os.path.isfile(file):\n                params.extend(['-i', file])\n        params.extend(['-c:v', 'copy'])\n        params.extend(['-c:a', 'aac'])\n        params.extend(['-strict', 'experimental'])\n        params.extend(['--', output + \".\" + ext])\n        return subprocess.call(params, stdin=STDIN)\n    else:\n        raise EnvironmentError('No ffmpeg found')\n\n\ndef ffprobe_get_media_duration(file):\n    print('Getting {} duration'.format(file))\n    params = [FFPROBE]\n    params.extend(['-i', file])\n    params.extend(['-show_entries', 'format=duration'])\n    params.extend(['-v', 'quiet'])\n    params.extend(['-of', 'csv=p=0'])\n    return subprocess.check_output(params, stdin=STDIN, stderr=subprocess.STDOUT).decode().strip()\n","sourceCodeStart":282,"sourceCodeEnd":311,"githubUrl":"https://github.com/soimort/you-get/blob/049548f3f3f35e67ba8d3181c71fdc71d11cf260/src/you_get/processor/ffmpeg.py#L282-L311","documentation":"Raised in ffmpeg_concat_mp4 (src/you_get/processor/ffmpeg.py:300) when merging downloaded segments requires ffmpeg but neither ffmpeg nor avconv was detected at import time (module-level probe get_usable_ffmpeg sets FFMPEG=None). The you-get project only ships a downloader; multi-segment merge and format conversion are delegated to an external ffmpeg binary, so its absence makes the operation impossible rather than degraded.","triggerScenarios":"Downloading any stream delivered as multiple segments (e.g. HLS) with merge=True: after download, ffmpeg_concat_av/ffmpeg_concat_mp4 is called, has_usable_ffmpeg() is False, and the else branch raises EnvironmentError('No ffmpeg found'). Also fires when ffmpeg is on PATH but is a broken/renamed build whose '-version' output fails the assert in get_usable_ffmpeg (line 24).","commonSituations":"Fresh minimal container (alpine/slim Docker images) or CI runner with no ffmpeg package; ffmpeg not on PATH in a GUI-launched app or Windows without PATH entry; an ffmpeg build that prints a different banner (version parse fails the assert); avconv-only systems (old Debian/Ubuntu) where avconv is also missing.","solutions":["Install ffmpeg: apt-get install -y ffmpeg (Debian/Ubuntu), apk add ffmpeg (Alpine), brew install ffmpeg (macOS), or winget/choco install ffmpeg (Windows), then re-run — the module re-probes on next start.","Ensure the ffmpeg binary is on PATH for the process that runs you-get (print os.environ['PATH']; for GUI apps set PATH explicitly or use an absolute path).","If ffmpeg is installed but still not detected, run `ffmpeg -version` manually; the first line must start with 'ffmpeg version <nonzero>' or 'avconv' (get_usable_ffmpeg asserts this).","As a workaround, pass merge=False / info_only=True to skip merging, keeping the raw segments.","Guard in code with has_ffmpeg_installed() from you_get.processor.ffmpeg before starting a multi-segment download."],"exampleFix":"# before\nfrom you_get.extractors import some_extractor\nsome_extractor(url)  # raises EnvironmentError('No ffmpeg found') at merge step\n\n# after\nfrom you_get.processor.ffmpeg import has_ffmpeg_installed, FFMPEG\n\nif not has_ffmpeg_installed():\n    raise SystemExit('ffmpeg is required for merging — install it first')\nsome_extractor(url)","handlingStrategy":"validation","validationCode":"from you_get.processor.ffmpeg import has_usable_ffmpeg\n\nif not has_usable_ffmpeg():\n    raise SystemExit('ffmpeg is required for segment merging — install it or pass merge=False')","typeGuard":"null","tryCatchPattern":"try:\n    download_urls(urls, title, ext, size, merge=True)\nexcept EnvironmentError as e:\n    if 'No ffmpeg found' in str(e):\n        # keep raw segments instead of aborting\n        download_urls(urls, title, ext, size, merge=False)\n    else:\n        raise","preventionTips":["Provision ffmpeg in Dockerfiles and CI images before running multi-segment downloads (apt-get/apk/brew install ffmpeg).","Check has_usable_ffmpeg() at program start and fail fast with an actionable message.","Verify `ffmpeg -version` works in the same shell/env the downloader runs in (PATH differences for cron, systemd, GUI launches).","When ffmpeg can't be guaranteed, run with merge=False and merge segments later where ffmpeg exists."],"tags":["ffmpeg","environment","merge","dependency","environmenterror"],"backgroundTag":null,"analyzedSha":"049548f3f3f35e67ba8d3181c71fdc71d11cf260","analyzedAt":"2026-08-15T03:58:15.069Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}