General
Unique ID : 311795358270161665158539797930749663166 (0xEA919A09196F0CAEF4E1B4FEB72B17BE)
Complete name : gource2.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 1.96 GiB
Duration : 2h 35mn
Overall bit rate : 1 811 Kbps
Encoded date : UTC 2015-01-07 20:14:22
Writing application : mkvmerge v7.4.0 ('Circles') 64bit built on Dec 17 2014 11:31:10
Writing library : libebml v1.3.0 + libmatroska v1.4.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L4.2
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : V_MPEG4/ISO/AVC
Bit rate : 266 Kbps
Width : 1 280 pixels
Height : 1 024 pixels
Display aspect ratio : 5:4
Frame rate mode : Variable
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 138 r2363 c628e3b
Encoding settings : cabac=0 / ref=1 / deblock=0:1:1 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
Default : Yes
Forced : No
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 2h 35mn
Bit rate mode : Constant
Bit rate : 1 509 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossy
Stream size : 1.64 GiB (83%)
Language : English
Default : Yes
Forced : No
time summary
exiftool
real 0m0.089s
user 0m0.081s
sys 0m0.008s
mplayer
real 0m0.050s
user 0m0.034s
sys 0m0.017s
ffprobe/ffmpeg
real 0m0.017s
user 0m0.011s
sys 0m0.007s
mediainfo
real 0m0.029s
user 0m0.025s
sys 0m0.004s
YMMV, but ffprobe is the fastest followed by mediainfo then mplayer and finally exiftool
To return only the Width and Height mediainfo is an excellent tool.
mediainfo --Inform="Video;%Width%" Videofile && mediainfo --Inform="Video;%Height%" Videofile will do exactly that, no more, no less, for a vast array of supported video files.
There is a long list of useful Inform= parameters which you can obtain with the command mediainfo --Info-Parameters
If you want the output in standard WidthXHeight format use Width=$(mediainfo --Inform="Video;%Width%" Video.File)&& Height=$(mediainfo --Inform="Video;%Height%" Video.File)&&echo $Width"X"$Height
There's a bash script here that you could easily modify to meet your needs.