affaan-m/ECC · error · RuntimeError
Decoder produced no frames
Error message
Decoder produced no frames
What it means
transform_stream counts decoded frames n; if the decoder produced no frames at all it raises RuntimeError('Decoder produced no frames') instead of returning 0. This makes empty decoder output an explicit failure rather than silently producing an empty output file.
Solutions
- Verify the media actually contains decodable video frames: ffprobe -count_frames source
- Check that start is within the media duration
- Run the decoder command manually and check stderr for codec/decode errors
- Install/reinstall a full ffmpeg build that supports the source codec
Example fix
// before render(src, start=600, ...) # video is only 30s -> no frames // after render(src, start=0, ...) # valid in-range start
Defensive patterns
Strategy: validation
Validate before calling
dur = float(ffprobe_duration(src)) assert dur > 0, 'media has no video frames' assert 0 <= start < dur, 'start outside media duration'
Try / catch
try:
render(src, start, out)
except RuntimeError as e:
if 'no frames' in str(e):
print('decoder yielded zero frames — check start range and codec support') Prevention
- Query duration via ffprobe and clamp start to [0, duration)
- Confirm the source contains a video stream (not audio-only)
- Use a full-featured ffmpeg build (e.g. from ffmpeg.org) with the needed codecs
- Reject zero-byte or metadata-only inputs early
When it happens
Trigger: The ffmpeg decode command yields zero frames (empty input file, invalid seek start beyond EOF, unsupported codec producing no packets); dec.stdout closes immediately with no frame data.
Common situations: Passing a start timestamp past the end of the media; pointing render at a zero-byte or metadata-only file; a codec not compiled into the installed ffmpeg build.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Media command produced an empty output
- Decoder produced a truncated frame
- apply_local needs at least one media clip
- asset contains too few frames
- asset requires verified alpha
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/8ab6e3f252e11b6e.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/tasteforge/media/glitch.py:96
y = 0
while y < height:
bh = int(rng.integers(8, 28))
if rng.random() < 0.12 * p:
shift = int(rng.integers(4, 40) * p) * (
1 if rng.random() < 0.5 else -1
)
out[y : y + bh] = np.roll(out[y : y + bh], shift, axis=1)
y += bh
if p > 0.2:
r = int(2 + 8 * p)
b = int(1 + 6 * p)
out[:, :, 0] = np.roll(out[:, :, 0], r, axis=1)
out[:, :, 2] = np.roll(out[:, :, 2], -b, axis=1)
enc.stdin.write(out.tobytes())
n += 1
if not n:
raise RuntimeError("Decoder produced no frames")
return n
def render(
source,
start,
duration,
output,
seed,
mode="drift",
width=1920,
height=1080,
fps=30,
overwrite=False,
):
geometry(width, height, fps, duration)
if not math.isfinite(start) or start < 0:
raise ValueError("Start must be finite and nonnegative")View on GitHub (pinned to 8321021c54)