I am looking for a simple library, compatible with Python 3.7, which can extract metadata of video files, specifically the capture/recording datetime; the date and time when the video was shot. I am mainly looking to do this on .mov files. hachoir-metadata
has no Python library as far as I'm aware; only a command-line interface, and enzyme
works only on .mkv files, though this isn't clearly stated in the description. The reason I want to retrieve the recording/capture datatime as a string is that I want to put this in the filename.
Before this question is marked as duplicate: similar questions are either unanswered or outdated. I am honestly puzzled as to why there isn't a proper way to retrieve video metadata in a Python script yet.
FFMPEG is a suitable library for this.
Installation: pip3 install ffmpeg-python
How to use:
import ffmpeg
vid = ffmpeg.probe(your_video_address)
print(vid['streams'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With