Let’s say you have just spent few weeks in some exotic country with a bunch of friends. Everyone had a digital camera and made thousands of photos. Now you have several directories with hordes of oddly named photos and you just want see all of them in the order they were taken. Throwing them all in one folder and setting file ordering by date might help but everyone’s camera can have a different internal time. File system dates can also be lost on their way to you (FTP upload etc.).
Being a programmer, rather that searching for some program on the Internet, I wrote my own quick and dirty command line tool for this task (mostly hard-coded paths etc.) in mid 2010. This year, I added GUI (where all the settings can be adjusted), some more date & time functions, and basically made the whole thing usable. And finally, beta release of PhotoMixer is available.
» 1.4 MiB - 252 hits - December 4, 2011 (last update December 4, 2011)
Tool for sorting photos from different sources by date. Single EXE, Windows only.
Please report any bugs and problems you encounter. Ideas for new features as well!
PhotoMixer takes photo sources as input and mixes/sorts them. Photo source is a folder with photos that have different properties than some other source. Most often, it’s from a different person and/or taken with different camera. PhotoMixer takes all the photos from all sources and puts them all in one output folder with file names that contain timestamps (so that the files appear in the same order regardless if you sort them by name, type, or date).
The most important this is: it can adjust date & time of photos from each source automatically. As the result, you now have a folder with all the photos from your trip in the right order even though they originally came from ten people with all of them having wrong date & time setting in their cameras. Where’s the catch? Well, there should be one photo that each of these people took at nearly the same time. These reference photos are then used by PhotoMixer to synchronize the sources.
Each source can be synchronized using reference photo or just by explicit time shift. Photo date and time is taken from embedded EXIF metadata that’s generated by digital camera and inserted in JPEG file. Only when, for some reason, EXIF is not present, file system date is used instead. When using reference photo synchronization one of the sources must be designated as main reference source. That is the source whose dates will not be modified and all other sources will be shifted in regard to date differences between their reference photo and that of the main source.
PhotoMixer also offers some useful tools for related tasks.
PhotoMixer employs tabbed user interface where the first tab contains output settings and log. Additional tabs define photo sources. When you start the tool for the first time new source is created, and you can start setting it up and adding more sources. When you are done with sources, go to Settings tab, adjust output options, and finally click Run button.
For each source you can select folder with photos and type of synchronization. For sync by reference photo you must select this photo and for explicit shift you provide positive or negative time in seconds.
On Settings tab select the output folder, base name of the generated files (will be named “BaseName TimeStamp.jpg”), and main reference source used for synchronization.
All the options and source definitions can be saved for later usage and restored using the Save and Load actions in the Tools menu. There is also tool for clearing the output folder and two little more complex tools: Set Photo Date & Time and Set File Time from Photo Metadata.
If you totally lost all date & time info about some photos and you want at least something (e.g. you use some photo organizer and want some filtering based on year & month to work) you can generate it using Set Photo Date & Time tool. Some base date & time is selected and each photo can have optional time increment (e.g. first photo has “base time”, second has “base time + 5 minutes”, another one has “base time + 10 minutes”, etc.).
Set File Time from Photo Metadata tool can be used to restore file system date & time according to metadata inside the photo.
Nice to have features for future version
Some are definitely going to be included, some are more like pipe dreams.
- Detect blurred photos that you just want to delete.
- Detect similar images – often more people take a photo of the same thing but you want to keep just one (the best looking one).
- Resampling of output photos to different resolution. Although this is a lossy operation, it has its uses.
- Create embedded JPEG thumbnails where missing (they’re embedded by cameras but some photo editing program could remove it).
- Lossless rotation of MJPEG videos from cameras (90/180/270 rotations).
- Strip junk data streams (e.g. after lossless rotation in Irfan the old data stream is kept in the file resulting in 2x bigger file).
- Linux and Mac OS X version (at least with CLI).
- Something to deal with camera orientation (when taking the photo). Some cameras have positioning sensor and store this information in metadata so the program could rotate them accordingly. For others, some GUI that allows simple and fast manual rotations would be nice. Probably redundant: probably just do it in Live Gallery/Picassa/whatever.
Sorting of about 3000 photos too about 2 minutes on my desktop (nearly all of that time is spent reading EXIF metadata from the files). Here are some photos from the “last batch” (panoramas made in Microsoft ICE):