Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T20:54:54.657Z
Answers.LastActivityDate: 2015-05-27T20:54:54.657Z
Answers.UserDisplayName: Michael Tiemann
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-11T10:26:44.900Z
Comments.Text: Welcome Julian :) Please start with the tour: http://video.stackexchange.com/tour to get your first badge ;) Enjoy the site!
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-11T11:49:04.247Z
Comments.Text: 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.
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-11T11:51:23.013Z
Comments.Text: 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.
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-12T14:09:18.423Z
Comments.Text: 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...
Comments.UserDisplayName: Julian Honma
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-12T14:16:19.040Z
Comments.Text: 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.
Comments.UserDisplayName: Julian Honma
Tags: <video><video-editor><software-recommendation><photos>
Title: Keeping metadata (time/date) when extracting frames from video
UserDisplayName: Julian Honma
ThreadText: # 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 username_0 :) 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.
  
  
  ---
  
  