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

12
2009-05-18 22:57:46

7 Alternatives + Submit Alt

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


    5
    ffprobe video.flv
    clusterdoc · 2012-01-02 19:56:20 0

  • 0
    exiftool video.wmv
    dimwit_flathead · 2015-07-05 07:14:04 0
  • Works on *.mp4 as well. Show Sample Output


    0
    avconv -i vid.avi
    lowrez · 2015-10-16 22:49:52 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. https://ffmpeg.org/ffprobe.html#Description


    0
    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)


    0
    mediainfo (file.name)
    bhishma · 2016-12-31 17:59:31 0

What Others Think

obviously shorter than mplayer -ao dummy -vo dummy -identify filename.flv
bubo · 538 weeks and 4 days ago
mediainfo video.vlv
FranWilder · 362 weeks and 5 days ago
I like the mediainfo command FranWilder submitted better than the one I did.
topher1kenobe · 338 weeks and 1 day ago
exiftool video.mp4
dimwit_flathead · 219 weeks 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?

commandlinefu.com 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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: