{"record":{"id":"34ab094ebde2f99f","repo":"invoke-ai/InvokeAI","slug":"video-self-video-video-name-has-no-decodable-fra-34ab09","errorCode":null,"errorMessage":"Video {self.video.video_name} has no decodable frames (probed {n_frames}).","messagePattern":"Video (.+?) has no decodable frames \\(probed (.+?)\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/video_frame_extract_range.py","lineNumber":156,"sourceCode":"        le=120,\n        description=\"Output frame rate. 0 = match the source video's frame rate \"\n        \"(falls back to 16 fps if the source rate can't be probed).\",\n    )\n\n    def invoke(self, context: InvocationContext) -> ExtractVideoRangeOutput:\n        video_path = context.videos.get_path(self.video.video_name)\n        width, height, duration, source_fps = probe_video(video_path)\n\n        n_frames = decoder_frame_count(video_path)\n        if n_frames is None:\n            if not source_fps or duration <= 0:\n                raise ValueError(\n                    f\"Cannot determine frame count for {self.video.video_name}: \"\n                    f\"probe returned duration={duration}, fps={source_fps}.\"\n                )\n            n_frames = int(round(duration * source_fps))\n        if n_frames <= 0:\n            raise ValueError(f\"Video {self.video.video_name} has no decodable frames (probed {n_frames}).\")\n\n        start = self._resolve_index(self.start_frame, n_frames, \"start_frame\")\n        end = self._resolve_index(self.end_frame, n_frames, \"end_frame\")\n        if end < start:\n            raise ValueError(\n                f\"end_frame ({self.end_frame} → {end}) must be >= start_frame \"\n                f\"({self.start_frame} → {start}) after resolving negative indices.\"\n            )\n\n        # Derive the output frame rate from the source video when ``fps`` is 0\n        # (the default), so a trimmed clip plays back at the same speed as its\n        # source. Fall back to 16 fps (the Wan video default) when the source\n        # rate couldn't be probed.\n        if self.fps > 0:\n            output_fps = float(self.fps)\n        elif source_fps and source_fps > 0:\n            output_fps = float(source_fps)\n        else:","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/video_frame_extract_range.py#L138-L174","documentation":"Thrown when the resolved total frame count for the video is <= 0, meaning the file decodes to zero frames. Same guard as the single-frame extractor: the range extractor cannot operate on an empty frame stream.","triggerScenarios":"invoke(): decoder_frame_count returns <= 0, or the duration*fps fallback rounds to 0.","commonSituations":"Empty files; recordings aborted before any frames were written; containers with 0 fps metadata.","solutions":["Confirm the video plays and contains frames","Re-record or re-export the source","Re-mux/re-encode with ffmpeg to repair the container","Remove the empty clip from the pipeline"],"exampleFix":"// before\nVideoFrameExtractRange(video=aborted_capture, start_frame=0, end_frame=10)  # 0 frames\n// after\nVideoFrameExtractRange(video=valid_capture, start_frame=0, end_frame=10)","handlingStrategy":"validation","validationCode":"n = decoder_frame_count(path)\nif n is not None and n <= 0:\n    raise ValueError(f'{path} has no decodable frames; remove from pipeline')","typeGuard":"def is_nonempty_clip(n_frames: int | None) -> bool:\n    return n_frames is not None and n_frames > 0","tryCatchPattern":"try:\n    out = range_extract.invoke(context)\nexcept ValueError as e:\n    if 'no decodable frames' in str(e):\n        raise RuntimeError(f'{video.video_name} is empty; supply a valid source') from e\n    raise","preventionTips":["Run ffprobe frame-count checks before batch extraction","Drop zero-frame clips from pipelines early","Re-encode all sources to a canonical format at upload"],"tags":["video","decoding","frame-count"],"backgroundTag":"empty-video-frames","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}