>FFmpegLab
FFmpeg Guide

FFmpeg Debugging & Troubleshooting – Read Logs, Fix Errors Fast

Stop staring at cryptic error messages. Master -loglevel, decode filtergraph failures, debug stream mapping, and use the FFmpegLab IDE as your personal linting tool.

FFmpeg is incredibly powerful, but its error messages can feel like ancient riddles. You paste a command, hit Enter, and get:

Conversion failed!

That's it. No context, no hint—just failure. Or worse, a wall of text with a single line buried in the middle that actually tells you what went wrong. Most tutorials show working examples and never teach you how to fix things when they break.

This guide changes that. You'll learn how to read FFmpeg's language, use the right log levels, decode filtergraph failures, and leverage the FFmpegLab IDE as a real-time linter for your commands.

Key takeaways

The Gap: Working Examples vs. Broken Reality

Tutorials are great—until your input file doesn't match the example. The documentation for ffmpeg lists options and flags, but it rarely teaches diagnostic thinking. When the command fails, you're left with a cryptic message and no roadmap.

The gap isn't a lack of information; it's a lack of methodology. This guide gives you a step-by-step approach to troubleshooting any FFmpeg failure.

The Symptom: "Conversion failed!" – Now What?

You see the dreaded error banner. Your instinct might be to copy the error into Google and pray. But before you do, take a breath and follow these steps:

  1. Increase the log level to see more details.
  2. Check the very last error line—FFmpeg usually tells you the specific problem right before exiting.
  3. Verify your inputs using ffprobe.
  4. Simplify the filtergraph—remove filters until it works, then add them back one by one.

Let's dive into each step.

Log Levels – Your First Weapon

The -loglevel (or -v) flag controls how much information FFmpeg prints. Most users stick to the default (info), which hides crucial details.

LevelFlagWhen to use
quiet-loglevel quietProduction scripts (no output unless fatal)
fatal-loglevel fatalOnly show fatal crashes
error-loglevel errorShow errors and fatal messages (good for CI/CD)
warning-loglevel warningShow warnings and above (default for many scripts)
info-loglevel infoDefault—shows progress, some metadata
verbose-loglevel verboseMore details about inputs, outputs, and filter setup
debug-loglevel debugEverything—stream info, frame details, filter negotiation
trace-loglevel traceInsane detail—every frame, every byte (use as last resort)

Pro tip: Start with error if you just want the clean error message. If that's not enough, escalate to verbose to see exactly where FFmpeg fails.

ShareRenders { } Code Config
Generated Code Logs Customize
# Verbose logging helps you see exactly where the pipeline breaks
ffmpeg -loglevel verbose -i input.mp4 -vf "crop=100:100" -c:a copy out.mp4

Decoding Filtergraph Errors

Filtergraphs are the most common source of failures. Here's how to decode the three most frequent errors:

1. "Input pad X is not connected"

You're using a filter that requires multiple inputs (like overlay or xfade), but you only linked one stream.

# WRONG – overlay needs two inputs
ffmpeg -i video.mp4 -filter_complex "[0:v]overlay[out]" -map "[out]" out.mp4
# Error: Input pad 1 is not connected

2. "Output pad Y is not labelled"

You split a stream but forgot to name one of the outputs.

# WRONG – second output [b] is not labelled
ffmpeg -i video.mp4 -vf "split [a]; [a] crop=100:100 [c]" out.mp4
# Error: Output pad 1 is not labelled

3. "Filter X has unset parameters"

You forgot a required parameter (like w or h in crop).

# WRONG – crop needs w and h
ffmpeg -i video.mp4 -vf "crop=" out.mp4
# Error: Filter crop has unset parameters

FFmpegLab's visual filtergraph editor solves this by highlighting unconnected pads and showing missing parameters before you even run the command.

Stream Mapping & Format Woes

-map syntax is notoriously tricky. The golden rules:

Container constraints: Not every format supports every codec. MP4 can contain H.264, HEVC, and AAC, but cannot contain FLAC or DTS without issues. MOV supports ProRes, but not VP9. Always check ffprobe to see what's inside.

ShareRenders { } Code Config
Generated Code Logs Customize
# Explicitly map video and audio to avoid "Stream specifier" errors
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -c:v libx264 -c:a aac output.mp4

FFprobe – The Diagnostic Swiss Army Knife

Before you build a complex command, inspect your input. FFprobe gives you a complete picture of what you're working with.

# List all streams with codec, resolution, bitrate, and metadata
ffprobe -v error -show_streams input.mov

# Check if your file actually has audio (surprisingly common issue)
ffprobe -v error -select_streams a -show_entries stream=codec_name -of default=noprint_wrappers=1 input.mp4

# Print the exact frame count and duration
ffprobe -v error -show_entries format=duration,size -of default=noprint_wrappers=1 input.mp4

If you get errors during encoding, always check your input with ffprobe first. It answers critical questions: Is there a video stream? What's the pixel format? Is the audio codec compatible with my output container?

Common Error Patterns & Their Fixes

Error MessageLikely CauseFix
Protocol not foundYou typed a file path without quoting spacesWrap paths in quotes: "my video file.mp4"
Invalid data found when processing inputInput file is corrupted or incompleteUse -err_detect explode to see more details
Pixel format not supportedEncoder doesn't support 10-bit YUVAdd -pix_fmt yuv420p for 8-bit output
Decoder not foundFFmpeg build missing a codecCheck available codecs: ffmpeg -codecs | grep your_codec
Frame size not setRaw video input needs dimensionsSpecify -video_size and -pixel_format
Bitrate not specifiedVBR encoding without target bitrateAdd -b:v 5M or use -crf

Understanding Exit Codes

In scripting, FFmpeg's exit code tells you exactly what happened:

In a bash script, you can check the exit code with echo $? immediately after running FFmpeg.

Debug Smarter with the FFmpegLab IDE

The FFmpegLab editor is built for this. Instead of running the command blindly, you get:

Here's a classic mistake—trying to use overlay with only one input—and how the FFmpegLab IDE catches it before you waste time waiting for the encode to fail.

ShareRenders { } Code Config
Generated Code Logs (⚠️ Error) Customize
[error] Filter overlay has input pad 1 not connected!
Hint: overlay requires two input streams. Example: [0:v][1:v]overlay
ffmpeg -i video.mp4 -filter_complex "[0:v]overlay[out]" -map "[out]" out.mp4

Notice how the IDE doesn't just show the command—it understands the filtergraph and warns you about the missing connection before you press run. That's the power of integrating a linter directly into the editor.

You can also toggle log levels directly in the UI, switch between verbose and quiet modes, and see exactly how the filtergraph interprets your streams.

Frequently Asked Questions (FAQ)

What does "Connection to pad not supported" mean?

This usually means you're trying to connect a video filter to an audio stream or vice versa. Check that you're linking the correct stream types (:v for video, :a for audio) in your filtergraph.

Why does my command work on one file but fail on another?

Input files can have different codecs, pixel formats, or stream counts. Always inspect your input with ffprobe before running the command. The FFmpegLab IDE automatically shows you the stream list when you load a file.

What's the best log level for debugging filtergraph errors?

Start with -loglevel verbose. It shows you exactly how FFmpeg negotiates filter parameters and which pads are being connected. If that's not enough, escalate to debug, but be prepared for a lot of text.

How do I check which codecs my FFmpeg build supports?

Run ffmpeg -codecs for a full list of supported encoders and decoders. For specific codec details, use ffmpeg -h encoder=libx264 to see all available options for that encoder.

Final Word

Debugging FFmpeg isn't about memorizing every error—it's about having a method. Start with the right log level, inspect your inputs with ffprobe, decode the filtergraph step by step, and use tools like the FFmpegLab IDE to get instant feedback.

The next time you see "Conversion failed!", don't panic. Open the logs, read the last error, check your filter connections, and fix it. You now have the toolkit to troubleshoot anything FFmpeg throws at you.

✦  Fresh from the render queue

Better FFmpeg workflows, delivered.

Get practical commands, new templates, and deep-dive guides for the edits that are usually hardest to get right.

✓  Copy-pasteable commands    ✓  Editor templates    ✓  No noise
One useful email at a time.