I installed ffmpeg 0.8.9 on ubuntu11 by
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-l
I got this error with Ubuntu 18 while using OpenAI Gym. You need correct versions of ffmpeg and x264 encoder. To get them, I used following and it worked:
conda install x264=='1!152.20180717' ffmpeg=4.0.2 -c conda-forge