AI Video Editing Flows

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".

Fails: notes.txt is not media
ffmpeg -i notes.txt out_text.mp4
Fails: the MP4 has no index (moov atom)
ffmpeg -i broken.mp4 out_broken.mp4

A 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.

Works on the complete file
ffmpeg -i a.mp4 out_whole.mp4

Unknown 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.

Fails: no encoder called libx265x
ffmpeg -i a.mp4 -c:v libx265x -c:a copy out_x.mp4
Works: libx265
ffmpeg -i a.mp4 -c:v libx265 -c:a copy out_x265.mp4

Copy 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).

Fails: H.264 into WebM with copy
ffmpeg -i a.mp4 -c copy out_c.webm
Works: VP9 and Opus
ffmpeg -i a.mp4 -c:v libvpx-vp9 -c:a libopus out_c.webm

An 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.".

Fails: .xyz is not a format
ffmpeg -i a.mp4 out.xyz
Works: .mp4
ffmpeg -i a.mp4 out_fmt.mp4

Size, 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.

Fails: odd height
ffmpeg -i a.mp4 -vf scale=500:-1 out_odd.mp4
Works: -2 rounds to even
ffmpeg -i a.mp4 -vf scale=500:-2 out_odd2.mp4

A 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.

Fails: scale with -c copy
ffmpeg -i a.mp4 -vf scale=640:-2 -c copy out_cf.mp4
Works: -c:a copy for the audio only
ffmpeg -i a.mp4 -vf scale=640:-2 -c:a copy out_cf2.mp4

When 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.

Works: -y overwrites
ffmpeg -y -i a.mp4 -t 1 exists.mp4

Concat 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.

Fails: absolute path in list
ffmpeg -f concat -i abs_list.txt -c copy out_u.mp4
Works with -safe 0: 20.0 s, two copies of a.mp4
ffmpeg -f concat -safe 0 -i abs_list.txt -c copy out_u.mp4

A file name with a space, unquoted, printed "Error opening input files: No such file or directory". Use quotes.

Fails: my video.mp4 split in two
ffmpeg -i my video.mp4 out_sp.mp4
Works: quotes
ffmpeg -i "my video.mp4" out_sp.mp4

When 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.

Fails: ffmpeg is not on PATH
ffmpeg -version
Works: add the bin folder to PATH (use your own path)
$env:Path += ";C:\path\to\ffmpeg\bin"; ffmpeg -version

We 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.

Make a.mp4
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.mp4

Limits: 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.