Make sure your LD_LIBRARY_PATH is set up to include all directories you want to search and then test it again.
You can test this quickly with:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg
which will set it only for that invocation.
Alternatively, you can edit /etc/ld.so.conf which contains the default directories searched. Some Linux distributions may not include /usr/local/lib in that file.
Note that you may also need to update the cache /etc/ld.so.cache by running ldconfig (as root, or with sudo).