#!/bin/sh 
# $Id: mmp,v 1.13 2007/02/18 06:29:02 grog Exp grog $
#
# Identify an MPEG stream.
# usage:  mpid $*
if [ "$1" = "-v" ]; then        # verbose: lots of stuff
  shift
  for i in $*; do 
    if [ -f $i ]; then         # ignore non-files; this is only part of the story
      echo -n "$i	"
      mplayer -vo null -ao null -frames 0 -identify $i 2>/dev/null | grep -v ^ID_
    fi
done
else
  for i in $*; do 
    if [ -f $i ]; then         # ignore non-files; this is only part of the story
      echo -n "$i	"
      mplayer -vo null -ao null -frames 0 -identify $i 2>/dev/null | grep ^VIDEO:
    fi
  done
fi

