Arranging photos by exif date

timVegas wrote on 1/22/2021, 5:34 PM

Hi,

I know Movie Studio Platinum (13.0) has rudimentary photo-slideshow features, but I thought I'd ping the group to see whether it can do what I want:

I took photos from three different angles from three cameras throughout the day (simultaneous). I'd like to set up three video tracks corresponding to each angle, and have photos I dropped arranged by Exif capture time so that I can select which angle to show at whatever time. Current behaviour of the software seems to be that adding a group of photos will result in the photo just gets shown for 5 seconds, regardless of when it was taken. I'm doubtful Movie Studio can do this, but I'd like to see what ideas you fine folks might have for solving this.

Comments

steve-quinney wrote on 1/23/2021, 2:39 AM

Hi Tim.

Don't know if this helps with your problem, but I had a similar problem and posted my solution a few weeks ago. I've pasted it here in case it helps. Good luck!

steve-quinney wrote on 1/2/2021, 1:19 PM

I’ve been using Movie Studio since version 12 and I’m still finding things it can do which I wasn’t aware of! My latest discovery is that media added to media bin can be easily sorted within media bin. All you do is add the media as usual, then click the “view” tab above the bin (next to the magnifying glass) and select “details”. Then right click within the media bin and select “view”. This gives a list of all the headings available to be displayed in the media bin. Tick the ones you want displayed.

For my particular problem (ie. media sorted on date modified), you hover the mouse on the “modified” heading in media bin and there is an arrow head barely visible (on my display at least) which lets you sort the media either ascending or descending – and voila, my media is in the order I want, albeit in the illogical American date format. Move the media to the timeline and it stays in the order in media bin.

If at a later date you add more media to media bin, simply re-sort as above, and the added media will show as 0 used, so it is then quite simple to identify the added media and slot it in the timeline at the appropriate place.

I’ve not yet had chance to try the suggestions from 3POINT, Set and Tony (for which I am very grateful), but having discovered the above it has taken the urgency away.

Hope the info above helps anyone else with the same problem as me.

timVegas wrote on 1/23/2021, 3:03 AM

Hi Steve, thanks for your suggestion, but it doesn't help me. My photos from the different cameras are taken at seemingly random intervals.... Camera 1 could be 10:30, 10:42, 10:44. Cam2 could be 10:19, 10:31, 10:33, and so on. I'd want the photos to be displayed on their separate video tracks at their relative E If times, and synced up with the other video tracks by time.

I have an old wedding video with grainy footage, but the audio is decent. What I'd like is to have that as track1, and all the other still photos superimposed from secondary video tracks whenever they are available, at the right time. With hundreds of still photos, I'm trying to avoid arranging them manually.

TonyL wrote on 1/24/2021, 5:47 AM

Not sure if the program "Bulk Rename Utility" would help you. It offers the opportunity to use the Exif info in a photo to rename files. I've attached the help page for Exif from the program.

timVegas wrote on 1/24/2021, 11:50 AM

The biggest part of this puzzle is still missing, which is to position the photos in a timeline at their relative capture times. It's starting to look like I need a third party tool to build video clips as described above for each camera angle, and then use Movie Studio to arrange those clips on a timeline with the grainy footage.

Former user wrote on 1/24/2021, 1:55 PM

I don't know of any video editing software that will place pics on the timeline relative to their exif information. I don't know if Movie Studio allows scripts, but someone could probably write a script for Vegas that would do this.

Musicvid wrote on 1/25/2021, 9:18 AM

As one would expect, the most powerful and versatile batch photo renamer is in Irfanview.

exif Date and Time basic command is $E36867

Renamed result is 2012_06_26 23_25_33.jpg  but of course any and all formatting can be customized.

Irfanview also imports proprietary metadata from a variety of cameras.

https://www.irfanview.com/

 

timVegas wrote on 1/25/2021, 9:43 AM

It looks like I may be able to do what I want with Exiftool to extract times into a CSV, open that with Excel to calculate durations, then use ffmpeg with the concat and duration flags to create my video streams. Thanks everyone for the suggestions.

Musicvid wrote on 1/25/2021, 10:10 AM

It took me exactly 45 seconds to rename a full folder to exif date in Irfanview. It would be worth your time to learn to use it.

[Screen grab deleted]

timVegas wrote on 1/25/2021, 10:13 AM

Why would I need to learn something I don't need to do?

Former user wrote on 1/25/2021, 11:16 AM

@Musicvid I don't think timVegas wants them just in the right order, he wants them on the timeline at the corresponding timecode vs. timestamp from the Exif information.

Musicvid wrote on 1/25/2021, 12:56 PM

@Former user @timVegas

My goodness.

That's exactly what Irfanview does. But I can tell from your opinions that I've done a ridiculously poor job of explaining its simplicity and ease of use.

Irfanview works instantly to rename any photo that contains exif timestamp information to just that. Among other things.

1. Input Folder (Look at the file names)

2. Batch Rename Dialog (Elapsed time <1 second)

3. Output Folder (Look at the file names)

Try it or not as you wish; but please accept that it has worked perfectly for me for a couple of decades ...

Best of luck!

Former user wrote on 1/25/2021, 1:02 PM

@Musicvid

Then does Movie Studio auto align it to the right timecode on the timeline?

Musicvid wrote on 1/25/2021, 2:00 PM

Yes. Presuming the Windows output folder sorts on "Name" or "Time" ascending, they will import to Vegas MSP in correct order.

Since they are no longer named as consecutive integers, trying it as an image sequence in Vegas Pro wouldn't work.

However, with the tens of thousands of syntax options available in Irfanview, it should be an easy task for a bright mind and a little experimentation to cause such a thing to happen.

timVegas wrote on 1/25/2021, 2:06 PM

The ordering isn't the problem - it is getting them to display for the length of time until the next photo is taken. If I take a photo at 1:10:30, and the next photo at 1:11:15, I want that first photo to display for 45 seconds. Unless Irfanview can produce actual video files, or that Vegas can arrange the photos this way, I don't think it alone can do the job.

Musicvid wrote on 1/25/2021, 2:24 PM

No, that is not possible in any Version of Vegas or Irfanview at this time. I've never heard of it in ffmpeg or avisynth either.

Sorry, affecting the duration and placement of the events on the timeline never entered my thinking.

Reason: AFAIK, You cannot embed SMPTE time code in a still image file. Vegas Pro is only able to sort video files internally on slaved Freerun SMPTE time stamps, not exif.

https://www.bhphotovideo.com/c/find/newsLetter/Time-Code.jsp

Try posting your question on the Scripting forum, which serves Vegas Pro versions only. I seriously doubt if that sophisticated treatment is mathematically possible in a Vegas script.

 

Musicvid wrote on 1/25/2021, 3:16 PM

Final thoughts:

The Edit Details window in Vegas Pro is structured like a spreadsheet, and will import to and export directly from Microsoft Excel.

If I needed to do this, I think I would write an Excel routine to take the timestamp from the exif (Active Take) column, subtract it from the next cell down, and calculate a new Start Time and Duration for the next event. Seems plausible. The screenshot is from just a random video project, nothing do do with stills.

Musicvid wrote on 1/26/2021, 11:22 AM

@timVegas @Former user

Gentlemen, Here you go! Works in VP14.

Startled from slumber at 4:30 am with palm firmly planted on face, I was urgently compelled to do penance for my dense (and slightly disrespectful) behavior yesterday. I hope that this is enough of an apology that I someday, may too enjoy full redemption from having skimmed your relevant posts and for enjoining your patient forbearance.

Here's the link in case forum images aren't working:

https://drive.google.com/file/d/1PL21LYH8uneoCFXsnDqr8Y4NqA6lvBqM/view?usp=sharing

This is a proof-of-concept:

  1. I renamed my files to hh_mm_ss from exif data in Irfanview and loaded them in Vegas.
  2. I pasted the Edit Details data to Excel.
  3. In the Active Take column, I replaced "_" with ":" so it would look like Excel time stamps
  4. I added the End Time for the final event.
  5. I wrote the appropriate formulas for columns C, D, E, and I. Took me about an hour because I'm waaay rusty on my Excel chops.
  6. I saved as Tab Delimited and imported those columns back into Vegas Edit Details.
  7. Done. It won't work for a session spanning midnight; That's the only immediate limitation I can see.

I invite others to try it in your version of Vegas Pro; I don't think any version of MSP has an Edit Details pane.

And I'll shamelessly take credit for a good save. At 71, I find those more necessary than previously.

A sample .xlsx file (2019) is here, have fun playing.

https://drive.google.com/file/d/1pFGziMgNf5BgeOYgibsjEckWWe5Ddt1j/view?usp=sharing

Oh, now I know it can be converted to a Vegas Pro Script.

Regards,

timVegas wrote on 1/26/2021, 3:32 PM

Thanks for your efforts, @Musicvid. Thanks for sharing the screenshot too - I can confirm that my MSP doesn't have an Events view unfortunately (and I don't think it supports scripting either). I'll give my Exiftool / ffmpeg solution a try over the weekend, and update here if it works.

Musicvid wrote on 1/26/2021, 4:22 PM

Their is a veiled suggestion in all of this that maybe you are an individual who should be using Vegas Pro, as you are certain to need more advanced leveraging and scripting capabilities as time goes on.

Watch for specials, and check Humble Bundle and Steam regularly. Sometimes you will find Pro as low as $20, legit.

timVegas wrote on 2/1/2021, 2:24 AM

Here's the exiftool/ffmpeg solution. I googled and was surprised nobody else has done this. Both of these free tools are available on multiple OS platforms, but the syntax below is for Windows.

What you need:

Download exiftool and ffmpeg (I won't post a link - they're both popular tools easily findable by the great Google)

Make sure you can download this Excel spreadsheet. You'll need to edit it on your own Excel-capable machine (or upload it to GoogleDocs to perform further editing)

https://1drv.ms/x/s!AgFCNBReexfMnnn_cN0OlyR1yYaK?e=1JvgYJ

Instructions:

From a command prompt, navigate to where your jpg files are stored. Then run:

"<path to>\exiftool.exe" *.jpg -s -DateTimeOriginal -csv > photos.csv

(note - It's possible that the Exif field your camera/photo program uses might populate/prefer a different field from DateTimeOriginal, so change that as appropriate)
Open photos.csv in excel (or whatever program you have for .csv), then copy/paste the two columns into the first two columns of the ToFFMPEG.xlsx file I shared above. All the other columns in ToFFMPEG.xlsx past Column C are calculations - don't modify those. If the number of files you're pasting in exceeds the number of pre-populated formulas in Column C and beyond, just Fill Down those formula rows as well.

Important - sort by Column B, so that the durations will calculate correctly.

Note - the last row in the file will not be able to calculate a duration, so it will just take the duration from cell K2.
The calculations are in Columns D, E, F, and the final results are put in Column C. Copy that column C into your favourite txt editor. You'll see double quotation marks everywhere that weren't in Excel, but are an artifact of copy/paste when there are multiple lines per cell. Delete all of these double quotation marks with a search/replace. Save it as ToFFMpeg.txt . This is the input into FFMPEG.

Then, run the following ffmpeg command:

"<path to>\ffmpeg" -f concat -safe 0 -i ToFFMpeg.txt -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1" -pix_fmt yuv420p -c:v libx264 output.mp4

(the above command should be run on a single line, despite how this forum is splitting it across multiple lines)
This will create your mp4 file. Change the 1920:1080 resolution to whatever you need to optimize with your output video.

Limitations: exif data has only per-second granularity. If two photos are taken at the same second, one will have a duration of 0 seconds, and will probably be hidden by the second photo in your output video.

Apparently, ffmpeg has the ability to read and output exif data itself, but as I was already familiar with exiftool, that's what I used.

Here's a screenshot of the photo mp4 stream embedded with two video camera shots in my Movie Studio project: