How to install FFmpeg on Ubuntu 18.04

FFmpeg is a free and open source command line tool for transcoding multimedia files. It contains a set of shared audio and video libraries such as libavcodec, libavformat, and libavutil. With FFmpeg you can convert between various video and audio formats, set sample rates and resize videos.