Python native library to read metadata from videos?
Asked Answered
S

2

5

Is there a Python library to read metadata (camera model, time created, etc ...) from video files? The Perl equivalent is "exiftool." I checked pyexiv2, but it doesn't have video support like exiftool does. Thanks.

Swath answered 9/4, 2012 at 15:2 Comment(1)
I'd recommend using ExifTool over pyexiv2 anyway, even in Python. ExifTool is much more complete and versatile. See my answer on this related question.Gingham
B
5

I have used hachoir-metadata succesfully: http://pypi.python.org/pypi/hachoir-metadata

Burrow answered 26/4, 2012 at 11:34 Comment(0)
F
3

I have used PyExifTool, a wrapper for the command line program, exif tool. You can get the library here (I think this is the result of the related question in Sven's comment).

The neat thing about PyExifTool is that it also parses the metadata into a dictionary for you.

I used it on a list of file names from os.walk.

import exiftool 
exif_Executable="<path to exif executable>"    

with exiftool.ExifTool(executable_=exif_Executable) as et:
        metadata = et.get_metadata_batch(fileList)
Fordone answered 1/5, 2017 at 4:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.