I have a project that will need to be able to know the time a video file (such as .mp4
, .mov
, .mxf
etc.) was started (e.g. when record was pressed) and when the video file was ended in seconds since epoch.
So far what I have been doing is finding the File Modified
time and using that as the endpoint and then subtracting duration to find the beginning. This works pretty well in some cases but it appears that some cameras don't exactly write/modify files in a linear predictable way so sometimes the start/end times of the video files overlap when clearly you can't be recording 2 files at the same time.
Is there some other method or piece of metadata I could access using say ffprobe
(or alternative) in python to accurately determine when the video was started and when it was ended?