'This MPEG starts with a sequence of 0x00 followed by a PACK Header
http://dvd.sourceforge.net/dvdinfo/packhdr.html'

def isMPEG(self, file, force=False):

    file.seek(0, 0)
    buffer = file.read(10000)
    offset = 0
    while ((offset < (len(buffer) - 100)) and (buffer[offset] == '\x00')):
        offset += 1
    offset -= 2
    header = ('\x00\x00\x01%s' % chr(PACK_PKT))
    if ((offset < 0) or (not (buffer[offset:(offset + 4)] == header))):
        if (not force):
            return 0
        offset = buffer.find(header)
        if (offset < 0):
            return 0
    buffer += file.read(100000)
    self.ReadHeader(buffer, offset)
    self.start = self.get_time(buffer[(offset + 4):])
    while ((len(buffer) > (offset + 1000)) and (buffer[offset:(offset + 3)] == '\x00\x00\x01')):
        new_offset = self.ReadHeader(buffer, offset)
        if (new_offset == None):
            return 0
        if new_offset:
            offset = new_offset
            while ((len(buffer) > (offset + 10)) and (not ord(buffer[(offset + 2)]))):
                offset += 1
        else:
            offset += (buffer[(offset + 4):].find('\x00\x00\x01') + 4)
    self.__seek_size__ = 1000000
    self.__sample_size__ = 10000
    self.__search__ = self._find_timer_
    self.filename = file.name
    self.length = self.get_length()
    return 1
