How to install ffmpeg in Ubuntu 14.04, 14.10 and Linux Mint

I was trying to crop some video files in Ubuntu for my project. I read some article about ffmpeg that can be used to crop and edit the images and videos using Gnu/Linux machines especially in Ubuntu.

So I opened a terminal and tried to install ffmpeg.

sudo apt-get install ffmpeg

Oops! there is no package like that. Its showing me a message that

Package 'ffmpeg' has no installation candidate

Also I searched the repositories for ffmpeg.

sudo apt-cache search ffmpeg 

Still I couldn't find ffmpeg in the list of returned results.

After a long search on Internet, I found a lovely ppa from launchpad, mc3man/trusty-media that contain ffmpeg.

I have added that ppa to my system.

sudo add-apt-repository ppa:mc3man/trusty-media

Updated the repository.

sudo apt-get update

Then installed ffpmeg and gstreamer plugin

sudo apt-get install ffmpeg gstreamer0.10-ffmpeg