Search code examples
linuxcommand-linevideoffmpegresolution

How can I get the resolution (width and height) for a video file from a linux command line?


I've been digging through the mplayer/mencoder and ffmpeg documentation and I can't seem to come up with anything. I'm not especially picky as to the output format as I can use a regular expression to pull it out, I just can't seem to get the data in the first place.


Solution

  • MediaInfo has a command line version and provides the dimensions together with tons of other information.