How to find out what codec is being used in a video

One way of doing this is by using VLC. Open the file in question, right click on it in the playlist and you'll see something like this:

Codec info

Stats info

I'm on OS X but the idea is the same.

Another way is to open a terminal, navigate to the directory containing the file and do:

file foo.avi

This doesn't provide a great deal of information but it is a start.


Another command line option with less "harsh" information:

ffprobe -show_streams "file.mp4"

Even with better output, it's still hard to a regular guy understand. If you need samples of several file formats to test it:

Video Format Examples


You can get information about Audio/Video Codecs and additional information by installing mediainfo. Both GUI (Graphical User Interface) and command-line utilities are available. Use these commands to install:

sudo apt-get update
sudo apt-get install mediainfo

If you want to install GUI,

sudo apt-get install mediainfo-gui

for reference visit mediainfo