<p>If you are saving frames from PP using the snapshot tool, then by default it's saving a file that's of the form SEQUENCENAME_TIMECODE.  If you know the date/time of the start of the sequence, you can compute frame-accurate metadata by adding the timecode of the image to the adjusted datetime of the sequence start.  (By adjusted datetime, I mean that if your sequence starts at 01:00:00:00 and your actual clip was 16:20:25:15 on Apr 1, 2014, then you need to subtract one hour from the clip time to account for the SMPTE offset).</p>

<p>As for programming languages that will do what you want, look at bash (the Bourne Again Shell), Python, and/or Perl.  Perl is wicked cool in how it can slice and dice strings, do math, and put the strings back together.  But it is also wicked hard to learn idiomatically.  Python may be the best starting point.</p>

<p>EXIFtool is a great way to embed correct metadata into image files: <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/" rel="nofollow">http://www.sno.phy.queensu.ca/~phil/exiftool/</a></p>

<p>And it's a way to learn some Perl while you are at it.</p>

CC BY-SA 3.0
2015-05-27T20:54:54.657Z
2015-05-27T20:54:54.657Z
Michael Tiemann
<h3>Circumstances</h3>

<p>I recently started to extract frames from videos (GoPro) for underwater photography. I'm currently using Adobe Premiere Pro to do so, which works, but when I imported these new photos into Lightroom, I realized that the date/time metadata of the pictures don't match with the video's metadata (they have the date and time of when I extracted them, for obvious reasons).</p>

<p>This is really not convenient, since I need to manually re-adjust the time for each of these new pictures (I want all of my pictures to have accurate date/time metadata, since I often look back and want to know when I took these pictures).</p>

<h3>Question</h3>

<p>How can I extract a frame from a movie file and store the date/time metadata from the video to the frame? If this is possible, how can I store the time difference between the location of the frame and the start of the video?</p>

<p>Thank you very much.</p>

CC BY-SA 3.0
2015-04-11T10:26:44.900Z
Welcome Julian :) Please start with the tour: http://video.stackexchange.com/tour to get your first badge ;) Enjoy the site!
p2or
CC BY-SA 3.0
2015-04-11T11:49:04.247Z
Good question.  I think ideally you'd want the extracted frames to have the time/date stored in EXIF metadata, as well as (or instead of) file mod time.
Peter Cordes
CC BY-SA 3.0
2015-04-11T11:51:23.013Z
Copying the file mod time from one file to another file is easy (`touch file.jpg --reference=file.mp4` on GNU/Linux or cygwin), but IDK of any video frame grabbers that do that automatically.
Peter Cordes
CC BY-SA 3.0
2015-04-12T14:09:18.423Z
Do you know if it'd be possible to have a small program that would go through an entire folder (where both the pictures and videos are) and do that automatically? The only issue would be that I create several frames for each video (or sometimes don't create a frame from another video). So if the video is named: GOPR2499, my frames are named GOPR2499.MP4.Still001 and GOPR2499.MP4.Still002 etc...
Julian Honma
CC BY-SA 3.0
2015-04-12T14:16:19.040Z
I've taken 2 computer science class, so I can see how I could write a program that advances through each file, checks for IF statements and does stuff accordingly, but I just never wrote a program that affects files in my computer so I don't know what language to use or how to reference things in my computer. I know OCaml and JAVA which I both use on the IDE named Eclipse.
Julian Honma
<video><video-editor><software-recommendation><photos>
Keeping metadata (time/date) when extracting frames from video
Julian Honma
# Keeping metadata (time/date) when extracting frames from video

(Asked by: username_0 on 2015-04-10)

### Circumstances

I recently started to extract frames from videos (GoPro) for underwater photography. I'm currently using Adobe Premiere Pro to do so, which works, but when I imported these new photos into Lightroom, I realized that the date/time metadata of the pictures don't match with the video's metadata (they have the date and time of when I extracted them, for obvious reasons).

This is really not convenient, since I need to manually re-adjust the time for each of these new pictures (I want all of my pictures to have accurate date/time metadata, since I often look back and want to know when I took these pictures).

### Question

How can I extract a frame from a movie file and store the date/time metadata from the video to the frame? If this is possible, how can I store the time difference between the location of the frame and the start of the video?

Thank you very much.

**Tags:** video, video-editor, software-recommendation, photos

> **Comments:**
> **username_1**: Welcome Julian :) Please start with the tour: http://video.stackexchange.com/tour to get your first badge ;) Enjoy the site!  
> **username_2**: Good question.  I think ideally you'd want the extracted frames to have the time/date stored in EXIF metadata, as well as (or instead of) file mod time.  
> **username_2**: Copying the file mod time from one file to another file is easy (`touch file.jpg --reference=file.mp4` on GNU/Linux or cygwin), but IDK of any video frame grabbers that do that automatically.  
> **username_0**: Do you know if it'd be possible to have a small program that would go through an entire folder (where both the pictures and videos are) and do that automatically? The only issue would be that I create several frames for each video (or sometimes don't create a frame from another video). So if the video is named: GOPR2499, my frames are named GOPR2499.MP4.Still001 and GOPR2499.MP4.Still002 etc...  
> **username_0**: I've taken 2 computer science class, so I can see how I could write a program that advances through each file, checks for IF statements and does stuff accordingly, but I just never wrote a program that affects files in my computer so I don't know what language to use or how to reference things in my computer. I know OCaml and JAVA which I both use on the IDE named Eclipse.  

---

## 1 answers

### Answer by username_3 on 2015-05-27. Score: 1

If you are saving frames from PP using the snapshot tool, then by default it's saving a file that's of the form SEQUENCENAME\_TIMECODE. If you know the date/time of the start of the sequence, you can compute frame-accurate metadata by adding the timecode of the image to the adjusted datetime of the sequence start. (By adjusted datetime, I mean that if your sequence starts at 01:00:00:00 and your actual clip was 16:20:25:15 on Apr 1, 2014, then you need to subtract one hour from the clip time to account for the SMPTE offset).

As for programming languages that will do what you want, look at bash (the Bourne Again Shell), Python, and/or Perl. Perl is wicked cool in how it can slice and dice strings, do math, and put the strings back together. But it is also wicked hard to learn idiomatically. Python may be the best starting point.

EXIFtool is a great way to embed correct metadata into image files: <http://www.sno.phy.queensu.ca/~phil/exiftool/>

And it's a way to learn some Perl while you are at it.


---

