ffmpeg: Unrecognized option 'crf'. Error splitting the argument list: Option not found

I'm trying to merge two videos (like here) side by side.
The full log with command:

    ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' -map [vid] -c:v libx264 -crf 23 -preset veryfast output.mp4
ffmpeg version N-90232-g0645698ecc Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.2.0-8ubuntu3.2)
  configuration: --disable-x86asm
  libavutil      56.  8.100 / 56.  8.100
  libavcodec     58. 13.102 / 58. 13.102
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
Unrecognized option 'crf'.
Error splitting the argument list: Option not found

But getting message mentioned in the title.
I have ffmpeg version N-90232-g0645698ecc from Ubuntu 17.10 repos.


Your ffmpeg is not from the Ubuntu 17.10 repo and looks like it was compiled on your machine. It lacks --enable-gpl --enable-libx264 which is required to use -c:v libx264. Unrelated, but it has --disable-x86asm which is never recommended as it will result in slowness.

You have several options to fix this:

  • Use the ffmpeg package from the repo: sudo apt-get install ffmpeg

  • Download a recent compiled ffmpeg binary and put it in /usr/local/bin or ~/bin.

  • Follow the Ubuntu guide on the FFmpeg Wiki to compile ffmpeg.


In my case was anaconda3 which my system was calling ( and installling, removing, etc didn't fix my problem), you could find out if it is your case with:

whereis ffmpeg

After that I saw all the possible path, the system was calling conda version instead of system version. To be sure you have a compatible version with --crf install it with:

sudo apt-get install ffmpeg

then for calling with it, you should use the path from the system or modify your PATH variables (this is modify ~/.profile or ~/.bash or more options and how it works here). I didn't do that because everything works with ffmpeg conda version except the --crf argument.

How to use the compatible version with --crf

/usr/bin/ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

Where /usr/bin/ffmpeg is a one of the results of whereis ffmpeg