FFmpeg common errors and how to fix them
These are the FFmpeg errors we could trigger on Windows, with the exact lines FFmpeg printed and the command that fixed each one. We reproduced 11 messages and every fix ran with exit code 0. We did not test install steps for macOS or Linux.
What to choose
Read the lines just above "Conversion failed" or "Error opening" first. Find your message in the list, then use the fix in the section that follows.
- Invalid data found, moov atom not found: the input is not media or is damaged.
- Unknown encoder: the encoder name does not exist.
- Only VP8 or VP9 or AV1 video are supported for WebM, and height not divisible by 2: the container or the size does not suit the codec.
- Unable to choose an output format, already exists, filtering and streamcopy: a command shape problem.
- Unsafe file name, No such file, not recognized: a path or PATH problem.
Invalid data and moov atom
Two different problems end with the same last line. A text file given as input printed "[in#0 @ ...] Error opening input: Invalid data found when processing input". A truncated MP4 (we cut one to 1.31 MB, a third of the 3.92 MB original) printed "[in#0 @ ...] moov atom not found" first, then "[in#0 @ ...] Error opening input: Invalid data found when processing input".
ffmpeg -i notes.txt out_text.mp4ffmpeg -i broken.mp4 out_broken.mp4A file that lost its index needs to be downloaded or exported again. The same command on the whole 3.92 MB file ran with exit code 0 and 300 frames.
ffmpeg -i a.mp4 out_whole.mp4Unknown encoder and format errors
A wrong encoder name printed "[vost#0:0 @ ...] Unknown encoder 'libx265x'" and then "Error opening output files: Encoder not found". The fix ran and wrote HEVC video, 2.54 MB.
ffmpeg -i a.mp4 -c:v libx265x -c:a copy out_x.mp4ffmpeg -i a.mp4 -c:v libx265 -c:a copy out_x265.mp4Copy into a container that cannot hold the codecs printed "[webm @ ...] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.". Encoding to VP9 and Opus fixed it (4.09 MB).
ffmpeg -i a.mp4 -c copy out_c.webmffmpeg -i a.mp4 -c:v libvpx-vp9 -c:a libopus out_c.webmAn output name FFmpeg cannot map to a format printed "[AVFormatContext @ ...] Unable to choose an output format for 'out.xyz'; use a standard extension for the filename or specify the format manually.".
ffmpeg -i a.mp4 out.xyzffmpeg -i a.mp4 out_fmt.mp4Size, copy and overwrite errors
scale=500:-1 on a 720 pixel high file made an odd height. libx264 printed "[libx264 @ ...] height not divisible by 2 (500x281)". Using -2 gave 500x282.
ffmpeg -i a.mp4 -vf scale=500:-1 out_odd.mp4ffmpeg -i a.mp4 -vf scale=500:-2 out_odd2.mp4A filter and -c copy cannot be combined. FFmpeg printed "[vost#0:0/copy @ ...] Filtergraph 'scale=640:-2' was specified, but codec copy was selected. Filtering and streamcopy cannot be used together.". Copy only the audio and let the video re-encode.
ffmpeg -i a.mp4 -vf scale=640:-2 -c copy out_cf.mp4ffmpeg -i a.mp4 -vf scale=640:-2 -c:a copy out_cf2.mp4When the output already exists and the command cannot ask, FFmpeg printed "File 'exists.mp4' already exists. Overwrite? [y/N] Not overwriting - exiting" and the exit code was 0. Add -y to overwrite without asking.
ffmpeg -y -i a.mp4 -t 1 exists.mp4Concat paths, spaces and PATH
abs_list.txt held two lines of the form file 'C:/folder/a.mp4', with a full path. The command printed "[in#0 @ ...] Unsafe file name '.../a.mp4'" and then "[in#0 @ ...] Error opening input: Operation not permitted". We shortened the folder in the first message to ... . Add -safe 0.
ffmpeg -f concat -i abs_list.txt -c copy out_u.mp4ffmpeg -f concat -safe 0 -i abs_list.txt -c copy out_u.mp4A file name with a space, unquoted, printed "Error opening input files: No such file or directory". Use quotes.
ffmpeg -i my video.mp4 out_sp.mp4ffmpeg -i "my video.mp4" out_sp.mp4When ffmpeg is not on PATH, PowerShell printed "ffmpeg : The term 'ffmpeg' is not recognized as the name of a cmdlet, function, script file, or operable program.". Adding the folder with ffmpeg.exe to PATH for the session fixed it; the version line then printed.
ffmpeg -version$env:Path += ";C:\path\to\ffmpeg\bin"; ffmpeg -versionWe did not test installing FFmpeg on macOS or Linux, so this page has no steps for them.
Method and limits
All commands ran on FFmpeg 8.1.2 (a full Windows build) on a Windows 11 laptop, Ryzen 7 7735U, CPU only, on 2026-11-06. We added -y and -threads 4 to every run; they are left out of the commands shown. In quoted FFmpeg messages the hex address after @ changes on every run, so we replaced it with ...
a.mp4 is a synthetic 10 s test file (testsrc2 picture and a sine tone, 1280x720, 30 fps, a keyframe every 2 seconds), made with the command below. The messages are from the commands shown, on Windows only.
ffmpeg -f lavfi -i testsrc2=duration=10:size=1280x720:rate=30 -f lavfi -i sine=frequency=440:duration=10:sample_rate=48000 -c:v libx264 -pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0 -c:a aac -shortest a.mp4Limits: one run of each command, so the sizes and times are single measurements and not averages. Times were taken on a laptop that was doing other work. Results depend on the input file and the FFmpeg version, so check yours. The messages can change between FFmpeg versions, and macOS and Linux messages can differ.
Related: FFmpeg for video editors, FFmpeg convert video format: MOV, MKV, MP4 and WebM, FFmpeg resize and crop video: scale, pad and 9:16, Join videos with FFmpeg without errors and FFmpeg command builder.
Page checked on Nov 4, 2026.