i found this nice script on google which automatically installs ffmpeg and the required library. do this in ssh: