I want to get the video length metadata of .mp4 files, using either a module that comes with Python or a module available on PyPi and doesn't require external software. I've searched all over the internet, and all I could find was either modules that don't support .mp4 files, outdated and non-functioning modules, and modules that require external software.
It only has to be able to run on Windows*
You could use moviepy.
First, install it using
pip
:Then, from python, make sure you have the ffmpeg binary installed (only required once, but harmless if you call it multiple times):
Then you can use
VideoFileClip
to query and manipulate the file: