ffmpeg to get video metadata

ffmpeg -i <file name>

This generates an error from ffmpeg (no output file name), but also dumps the file info like this:

C:\tmp\encode>ffmpeg -i \videos\boarding-march02.mpg
Input #0, mpeg, from '\videos\boarding-march02.mpg':
Duration: 00:02:47.3, bitrate: 3251 kb/s
Stream #0.0: Video: mpeg1video, 360x240, 29.97 fps
Stream #0.1: Audio: mp2, 48000 Hz, stereo, 192 kb/s
Must supply at least one output file

transcode to get video metadata


The tcprobe tool comes with the transcode package and is built and installed by default

 
tcprobe -i <file name>
 

This exits normally printing output like the following:

 
[tcprobe] RIFF data, AVI video
[avilib] V: 30.003 fps, codec=DIV3, frames=31978, width=384, height=284
[avilib] A: 22050 Hz, format=0x01, bits=8, channels=1, bitrate=176 kbps,
[avilib] 31964 chunks, 23501479 bytes, CBR
[tcprobe] summary for Dinner_for_One.avi, (*) = not default, 0 = not detected
import frame size: -g 384x284 [720x576] (*)
 frame rate: -f 30.003 [25.000] frc=0 (*)
 audio track: -a 0 [0] -e 22050,8,1 [48000,16,2] -n 0x1 [0x2000] (*)
 bitrate=176 kbps
 length: 31978 frames, frame_time=33 msec, duration=0:17:45.826
 



mplayer to get video metadata


Mplayer comes with a small script in the TOOLS directory of the source tree. This can be used to examine properties of video:

 
midentify <file name>
 

This should yield output looking like this:

ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_FILENAME="Dinner_for_One.avi"
ID_DEMUXER=avi
ID_VIDEO_FORMAT=DIV3
ID_VIDEO_BITRATE=1501120
ID_VIDEO_WIDTH=384
ID_VIDEO_HEIGHT=284
ID_VIDEO_FPS=30.003
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=1
ID_AUDIO_BITRATE=176400
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=1065.83
ID_VIDEO_CODEC=ffdivx
ID_AUDIO_BITRATE=176400
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=1
ID_AUDIO_CODEC=pcm