I am working on a Python script to sort photos based on their date. I would like to include videos as well, but there is no metadata standard like EXIF for photos.
While testing, I noticed I could find my videos' date using bash:
$ head -c 1600 DSC_7643.AVI | strings
AVI LIST&
hdrlavih8
LISTt
...
NIKON
nctgr
NIKON CORPORATION
NIKON D90
A1.00
B1.00
2012:10:30 09:38:16
2012:10:30 09:38:16
If I had this list, I could just iterate it looking for parseable dates and make a pretty good guess.
The man
page for strings
says: "find the printable strings in a object, or other binary, file". Unfortunately, this is a pretty hard description to search for something similar in Python, and I don't know exactly what it's doing to achieve its result. Is there a Python utility or library that can do something similar?