{"record":{"id":"d35d5621397baa2e","repo":"ytdl-org/youtube-dl","slug":"error-running","errorCode":null,"errorMessage":"error running ","messagePattern":"error running ","errorType":"exception","errorClass":"PostProcessingError","httpStatus":null,"severity":"error","filePath":"youtube_dl/postprocessor/ffmpeg.py","lineNumber":337,"sourceCode":"        new_path = prefix + sep + extension\n\n        information['filepath'] = new_path\n        information['ext'] = extension\n\n        # If we download foo.mp3 and convert it to... foo.mp3, then don't delete foo.mp3, silly.\n        if (new_path == path\n                or (self._nopostoverwrites and os.path.exists(encodeFilename(new_path)))):\n            self._downloader.to_screen('[ffmpeg] Post-process file %s exists, skipping' % new_path)\n            return [], information\n\n        try:\n            self._downloader.to_screen('[ffmpeg] Destination: ' + new_path)\n            self.run_ffmpeg(path, new_path, acodec, more_opts)\n        except AudioConversionError as e:\n            raise PostProcessingError(\n                'audio conversion failed: ' + e.msg)\n        except Exception:\n            raise PostProcessingError('error running ' + self.basename)\n\n        # Try to update the date time for extracted audio file.\n        if information.get('filetime') is not None:\n            self.try_utime(\n                new_path, time.time(), information['filetime'],\n                errnote='Cannot update utime of audio file')\n\n        return [path], information\n\n\nclass FFmpegVideoConvertorPP(FFmpegPostProcessor):\n    def __init__(self, downloader=None, preferedformat=None):\n        super(FFmpegVideoConvertorPP, self).__init__(downloader)\n        self._preferedformat = preferedformat\n\n    def run(self, information):\n        path = information['filepath']\n        if information['ext'] == self._preferedformat:","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/postprocessor/ffmpeg.py#L319-L355","documentation":"Raised by FFmpegExtractAudioPP.run when run_ffmpeg raises any exception that is NOT AudioConversionError — a catch-all 'error running ffmpeg/avconv'. It fires when the failure happens outside the normal FFmpegPostProcessorError channel: OSError spawning the binary, KeyboardInterrupt-adjacent errors, or unexpected per-option exceptions.","triggerScenarios":"The ffmpeg executable disappeared or lost execute permission between version check and run; I/O errors reading the source file (deleted mid-run, disk full); unexpected exceptions inside run_ffmpeg option handling.","commonSituations":"Disk full during conversion; file moved/deleted by the --exec hook or another process mid-download; environment changed (container restarted) between init and post-processing.","solutions":["Re-run with -v to see the underlying traceback before the generic message","Free disk space and confirm write permissions on the output directory","Make sure nothing else deletes or moves the file between download and post-processing","Reinstall/repair ffmpeg if the binary itself fails to execute ('ffmpeg -version')"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import shutil, os\n\ndef environment_ready_for_extract(path):\n    exe = shutil.which('ffmpeg') or shutil.which('avconv')\n    return bool(exe) and os.access(os.path.dirname(path) or '.', os.W_OK)","typeGuard":null,"tryCatchPattern":"try:\n    ydl.download([url])\nexcept PostProcessingError as e:\n    if str(e).startswith('error running'):\n        # generic wrapper: keep the downloaded file, log and continue the batch\n        log.warning('ffmpeg crashed for %s; keeping original file', url)","preventionTips":["Run with -v when this fires — the generic message hides the real traceback","Ensure adequate disk space and file permissions before large batch conversions","Do not let other processes move/delete files between download and post-processing"],"tags":["ffmpeg","audio-conversion","generic","postprocessor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}