Get video information with ffmpeg

ffmpeg -i filename.flv
I used an flv in my example, but it'll work on any file ffmpeg supports. It says it wants an output file, but it tells what you want to know without one.
Sample Output
Input #0, flv, from 'mi-cc-03-bed_and_breakfast.flv':
  Duration: 00:00:18.7, start: 0.000000, bitrate: 64 kb/s
  Stream #0.0: Video: flv, yuv420p, 480x360, 29.92 fps(r)
  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 64 kb/s
Must supply at least one output file

2009-05-18 22:57:46

4 Alternatives + Submit Alt

  • ffprobe is specially intended to get video information Show Sample Output

    ffprobe video.flv
    clusterdoc · 2012-01-02 19:56:20 0
  • ffprobe doesn't throw an error and was actually made to do exactly that. Usually ffprobe is located in the same folder as ffmpeg.

    ffprobe -i filename.flv
    Yamy · 2016-10-15 20:26:34 0
  • MediaInfo supplies technical and tag information about a video or audio file. (sudo apt install mediainfo)

    mediainfo (
    bhishma · 2016-12-31 17:59:31 0
  • mp4box is great when working with mp4s

    mp4box -info video.mp4
    alienresident · 2013-01-18 14:43:29 0

What Others Think

obviously shorter than mplayer -ao dummy -vo dummy -identify filename.flv
bubo · 474 weeks ago
mediainfo video.vlv
FranWilder · 298 weeks and 1 day ago
I like the mediainfo command FranWilder submitted better than the one I did.
topher1kenobe · 273 weeks and 4 days ago
exiftool video.mp4
dimwit_flathead · 154 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: