ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory

On Centos 6 or Centos 7, you may see the error while running ffmpeg. This error usually caused if the libraries are not loaded. Try below command to see the required libraries by the ffmpeg command. You will see “not found” message even the libraries are present on server. So to fix it, you will need to find out the path of the libraries using below commands. On my server, the path of the library is /usr/local/lib/. Find out the path on your server and append it in the file /etc/ld.so.conf the simply run below command to load the libraries. Now check the required libraries for ffmpeg and you should see: So the error is fixed. Now, you can enjoy using ffmpeg.