Only that you should get rid of stderr and you don't need case sensitivity here.
You said "small" and 'mediainfo' is decidedly smaller than 'mplayer'. I edited out the second mplayer line as I realise it shows exactly the same output the 'mediainfo' line below shows. So if you like easily parsable output but don't want to install another utility then you could use 'mplayer -noquiet -v -identify -nocache -vo null -ss 99999 file 2>/dev/null| grep -i "^id_[av]"'.
Code:
]$ mplayer -vo null -ao null -frames 0 file 2>/dev/null|grep -i '\['
VIDEO: [DIV3] 576x304 24bpp 23.976 fps 804.9 kbps (98.3 kbyte/s)
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm: ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
Code:
]$ mediainfo file 2>/dev/null| grep -i "^id_[av]"
ID_VIDEO_ID=0
ID_AUDIO_ID=1
ID_VIDEO_FORMAT=DIV3
ID_VIDEO_BITRATE=804904
ID_VIDEO_WIDTH=576
ID_VIDEO_HEIGHT=304
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=128176
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_VIDEO_CODEC=ffdivx
ID_AUDIO_BITRATE=32000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3