stream = InputIOStream(filelike, None, tags=[])
parser = guessParser(stream)
if not parser:
    return None
try:
    metadata = extractMetadata(parser)
except HachoirError:
    return None
return metadata
Python: Using Hachoir, how extract metadata for file-like objects?