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 out
Try midentify.sh (TOOLS/midentify.sh in the source code tree of MPlayer).
It will show information in a parseable format:
$ ./midentify.sh /data/myvid.flv
ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_FILENAME=/data/myvid.flv
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=VP6F
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=480
[,,,]
MediaInfo has a command line version and provides the dimensions together with tons of other information.
Here's an "almost-one-liner" I've concocted around ffprobe for exactly this purpose. Works pretty well for me both on Linux and MacOS.
#!/bin/bash
B='[[:blank:]]'
D='[[:digit:]]'
ffprobe "$1" 2>&1 \
| grep 'Stream.*Video.*fps' \
| sed "s/^.*$B\($D$D$D*x$D$D$D*\).*$/\1/"