def frames(self):
        """
        Returns the length of a video stream in frames. Returns 0 if not a video stream.
        """
        f=0
        if self.isVideo() or self.isAudio():
            if self.__dict__['nb_frames']:
                try:
                    f=int(self.__dict__['nb_frames'])
                except Exception as e:
                    print "None integer frame count"
        return f
Returns the length of a video stream in frames. Returns 0 if not a video stream.