views:

1612

answers:

3

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.

Thanks in advance!

+1  A: 

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

[,,,]

sleske
A: 

The good ol' "file" utility will often get the dimensions of a video file.

Andrew Medico
I tried it on a few and it was crazy unreliable. Seemed like it could only really handle mpeg files.
fiXedd
+1  A: 

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

Joachim Sauer
Awesome, thanks!
fiXedd