Reputation: 565
I am doing a project that requires me to know the exact datetime that a particular frame of a video file is occurring. I want to do this by knowing the start datetime of the video and then adding the elapsed time.
The problem is that .mp4 (and EXIF i.e. what exiftool would reveal) reveal their create/start times as ASCII date representations that are only accurate to the nearest second. In essence, I need a program or method that will let me get at the raw start time value of the video which I am assuming is stored as a long somewhere in the data of the file in milliseconds as per ISO.
Update 2: I have moved my update to a comment and will mark this question as "answered" to follow Stack Overflow convention.
Upvotes: 4
Views: 1970
Reputation: 565
This problem came up when I was trying to track the times that an athlete was performing an act of a sport. For example, a basketball player shooting 10 free-throws--the 10 moments, with millisecond-precision, where the player released the ball. The main thing I really needed was to graph the occurrences relative to one another with millisecond precision.
To do this I implemented a program that takes in a video and lets the user step through the frames with some button controls. The user can then select which frames the act is occurring on, which can be converted into the milliseconds since the start of the video at 0ms. This gets me the relative graphing that I wanted.
I was making the problem more difficult than it needed to be by thinking I needed the exact datetime that the act was occurring at. If you really wanted to sync with a millisecond-precise datetime, you could film a datetime clock and then look at the clock in the film to establish a "zero" point in the film. Then you could compare other moments in the film to that zero point.
Upvotes: 1