Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i see what codec was used in a video (Audio/Video) and extra information about what to use to reproduce the same compression/quality to the video.

share|improve this question
up vote 14 down vote accepted

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.

share|improve this answer
OMG. My IQ level just dropped like 99%. I forgot about that. Thanks boehj. – Luis Alvarado May 30 '11 at 2:01
No problemo. :) – boehj May 30 '11 at 2:08

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

share|improve this answer

The hard to find 'midenitfy' script. An ancient copy looks like:

# This is a wrapper around the -identify functionality.
# It is supposed to escape the output properly, so it can be easily
# used in shellscripts by 'eval'ing the output of this script. 
# Written by Tobias Diedrich <>
# Licensed under GNU GPL.

if [ -z "$1" ]; then
        echo "Usage: midentify <file> [<file> ...]"
        exit 1

 mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
        sed -ne '/^ID_/ {
                           s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p
share|improve this answer

You can get information about Audio/Video Codec and additional information by installing mediainfo. Both GUI ( Graphical User Interface ) and Command-line utility is available. Use this command 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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.