Topic: In need of a tool to batch tag EXIF time taken for image sequences from video

Report Abuse Report Abuse
NateLawrence (Over 1 year ago)
There are a number of programs to take a video and save each frame of the video as an image file.
Some of these include VirtualDub, FFMPEG, and Quicktime Pro and are useful for exporting a series of JPGs which can be used to create synths or panos.

Unfortunately I have found that the programs that I listed above either don't read the date and time metadata from the video or that metadata is lost when exporting the video from the camera.

If the time of day of any point in the video is known, it is a simple thing to do a little math and figure out when the video was begun being recorded.

Combine this with the knowledge of the video's frame rate (say 30 frames per second) and you should be able to easily come up with a reasonably accurate time that each frame was captured, since EXIF time taken in photos is accurate to hundredths of a second.
NateLawrence (Over 1 year ago)
Even if I had to use an estimated time for the beginning of the video, a satisfactorily accurate time for each frame could be calculated based on frame rate or video duration.

My dilemma is that I don't know of any tool that can automate the process of calculating the times for all frames or (more importantly, since the calculating could probably be done in Excel) writing those times to the appropriate images' metadata, such that when sorted by time taken they will appear in chronological order.

Does anyone know of an application that already does this?
If not, perhaps one of you coders like Christoph, Henri, or Josh would be kind enough to create a basic little app to perform this function?

Thanks in advance for any help that anyone can offer.
chrysler (Over 1 year ago)
Just tried putting something up in PowerShell but the method it uses requires the files to have enough internal space reserved for the metadata or it will fail. A workaround would be to first do some changes to the metadata from Explorer as this will reserve space in the files.

If this does not work for you, another option could be to run exiftool ( in a batch file or PS script.

Hope this helps.
Joscelin.Trouwborst (Over 1 year ago)
Should we go this direction at all? Why not have the Photosynth Camera app shoot at the pace of movement?
NateLawrence (Over 1 year ago)
Joscelin, this is more for cases where I already have shot video and want to create synths from it.

That may be new 4K footage or it may be old family videos at locations that I can't possibly go back and shoot photos for a synth at.

Ever since I was a child I've always watched video with some thoughts of how much data you could recover if you could solve for the camera motion and get some automated recovery of some of the scene's geometry and manually help it where the computer couldn't make sense of things and this has only increased since I began using Photosynth.

Whenever I watch a movie or a season of TV now, I'm always looking for shots where the camera is moving to make a synth out of.


The lack of time metadata in common video formats has just bothered me for a long time in terms of archiving video (totally separate from anything to do with Photosynth) and unpacking videos into image sequences just brings it to my attention that much more.
NateLawrence (Over 1 year ago)
Christoph, thanks for replying. I'll take a look at what you posted. 

Unfortunately I've never really had anyone who know how to code to teach me, so even command line stuff throws me off a bit, but I'll see what I can make of it.
Joscelin.Trouwborst (Over 1 year ago)
Nate, ah ok. As one can see, I too have old stuff. I do hope that the team will some day have plenty of resources to cover all needs. I feel the team will only get a lot more resources if Photosynth has mass adoption.
chrysler (Over 1 year ago)
The script can also be used to force a specific order of the photos for the synther. If your photos do not have any timestamps the synther needs to infer the correct order by photogrammetry alone, but if you tag the photos with (fake) consecutive timestamps, it uses that order. I had done some experiments with this a few months ago and it can be quite handy.