I often have problems reading AVI files with my TV\'s DVD player if they are not DivX or Xvid (e.g., DX50 is not readable).
I\'d like to make a fast script to determine
Try MediaInfo instead.
It lists the codec for each stream and its output is simple enough to parse - there's also an XML output option if you prefer XPath like queries.