C.W.K.
Stream
Lesson 04 of 08 · published

Common Errors & Fixes

~12 min · errors, debug, troubleshoot

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

The ten errors you'll see most

Memorize the fix for each:

  1. 'No such file or directory' — relative path wrong, or shell glob expanded incorrectly. Use absolute paths to debug.
  2. 'Could not find tag for codec X in stream #N, codec not currently supported in container' — codec/container mismatch. Either change container or re-encode the stream.
  3. 'Conversion failed!' with no detail — bump verbosity: -loglevel verbose or -loglevel debug.
  4. 'Cannot store overhead frame' — input is broken. Try -fflags +genpts -fflags +igndts.
  5. 'Width / height not divisible by 2' — encoder requires even dimensions. Use scale=W:-2 or pad.
  6. 'No accelerated colorspace conversion found' — pixel-format mismatch in HW pipeline. Add -pix_fmt yuv420p explicitly.
  7. 'Pad / scale: cannot be applied to this stream' — filter applied to wrong stream type. Check -vf vs -af.
  8. 'Invalid data found when processing input' — file is truncated or corrupt. See lesson 5.
  9. 'Stream specifier matches no streams' — your -map doesn't match anything. Run ffprobe -show_streams first.
  10. 'Output file does not contain any stream' — your filtergraph dropped everything. Likely a -map typo or unmatched label.

Code

Verbosity tiers·bash
# Default — minimal
ffmpeg -i in.mp4 out.mp4

# Show every command FFmpeg internally runs
ffmpeg -loglevel verbose -i in.mp4 out.mp4

# Full debug (firehose)
ffmpeg -loglevel debug -i in.mp4 out.mp4 2> debug.log

# Hide all but errors (for scripts)
ffmpeg -hide_banner -loglevel error -i in.mp4 out.mp4

# Stats progress without log spam
ffmpeg -loglevel error -stats -i in.mp4 out.mp4
Diagnosing a broken file·bash
# Try probing
ffprobe -v error -show_error -show_format input.mp4
# 'Invalid NAL unit size...' = broken bitstream
# 'moov atom not found' = MP4 missing index (lesson 5 fix)

# Trial decode and watch for errors
ffmpeg -err_detect explode -xerror -i input.mp4 -f null - 2>&1 | head -20

External links

Exercise

Deliberately produce three errors: (1) point FFmpeg at a non-existent file, (2) try to mux H.265 into AVI, (3) trim a clip with a stream specifier that doesn't exist (-map 0:a:99). Read the error message for each. Then re-run the AVI case with -loglevel verbose and identify exactly where in the log the helpful message appears.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.