Answers.Body: <p>The below answer was provided as a comment on the question by <a href="https://video.stackexchange.com/users/1871/gyan">Gyan</a>. I've reposted it as an answer so this question can be marked as solved.</p>
  
  <hr>
  
  <blockquote>
    <p>The image2 reader in ffmpeg can assign timestamps based on the modification time of the file, with nanosecond precision. Not possible on Win, AFAICT. So, on a linux box, you can parse the filename and generate a timestamp and touch the mtime of the file. The absolute timestamps don't matter, just need to make sure the deltas in the mtimes correspond to the desired deltas. Then rename or symlink the images to form a smooth numbered sequence. Once done, read as follows: ffmpeg -f image2 -ts_from_file 2 -i images%d.jpg -vf minterpolate=... – <a href="https://video.stackexchange.com/users/1871/gyan">Gyan</a></p>
  </blockquote>
  
  <hr>
  
  <p>This worked for me! I was able to use the <code>touch -d</code> command to set the timestamp on each file based on the filename, then use <code>ffmpeg -f image2 -ts_from_file 2 -i %d.png out.mp4</code> to create the video. Interpolation ended up being time-prohibitive, but shouldn't really be necessary in my final video.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-28T18:21:11.857Z
Answers.LastActivityDate: 2019-01-28T18:21:11.857Z
Answers.UserDisplayName: Kevin Rak
Body: <p>I have a large group (tens of thousands) of images which were captured to an SSD at the max speed possible, which was therefore not a constant frame rate. Because of this, when using FFMPEG to turn these into a constant frame-rate video it seems to speed up and slow down when it shouldn't.</p>
  
  <p>Is there a way to tell FFMPEG to time the images based on the timestamp in the filename rather than a constant framerate?</p>
  
  <p>For example, consider the following (contrived) list of files:</p>
  
  <pre><code>2019-01-28-08-00-28-000-000.tiff
  2019-01-28-08-00-28-700-000.tiff
  2019-01-28-08-00-28-900-000.tiff
  </code></pre>
  
  <p>These should be three sequential frames, but should have varying times between them. Then I can use the minterpolate filter to make it a smooth transition.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-28T13:28:17.330Z
Comments.Text: Which OS are you using?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-28T13:34:25.367Z
Comments.Text: I can use Windows or CentOS or Ubuntu if that somehow changes how FFMPEG works.
Comments.UserDisplayName: Kevin Rak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-28T13:52:06.827Z
Comments.Text: The image2 reader in ffmpeg can assign timestamps based on the modification time of the file, with nanosecond precision. Not possible on Win, AFAICT. So, on a linux box, you can parse the filename and generate a timestamp and touch the mtime of the file. The absolute timestamps don't matter, just need to make sure the deltas in the mtimes correspond to the desired deltas. Then rename or symlink the images to form a smooth numbered sequence. Once done, read as follows: `ffmpeg -f image2 -ts_from_file 2 -i images%d.jpg -vf minterpolate=...`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-28T17:03:35.487Z
Comments.Text: Awesome! Thanks! I'll give it a try! Can you post this as an answer so I can mark the question resolved if it works?
Comments.UserDisplayName: Kevin Rak
Tags: <ffmpeg>
Title: FFMPEG: Make video with non-constant framerate from image filenames
UserDisplayName: Kevin Rak
ThreadText: # FFMPEG: Make video with non-constant framerate from image filenames
  
  (Asked by: username_0 on 2019-01-28)
  
  I have a large group (tens of thousands) of images which were captured to an SSD at the max speed possible, which was therefore not a constant frame rate. Because of this, when using FFMPEG to turn these into a constant frame-rate video it seems to speed up and slow down when it shouldn't.
  
  Is there a way to tell FFMPEG to time the images based on the timestamp in the filename rather than a constant framerate?
  
  For example, consider the following (contrived) list of files:
  
  ```
  2019-01-28-08-00-28-000-000.tiff
  2019-01-28-08-00-28-700-000.tiff
  2019-01-28-08-00-28-900-000.tiff
  
  ```
  
  These should be three sequential frames, but should have varying times between them. Then I can use the minterpolate filter to make it a smooth transition.
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Which OS are you using?  
  > **username_0**: I can use Windows or CentOS or Ubuntu if that somehow changes how FFMPEG works.  
  > **username_1**: The image2 reader in ffmpeg can assign timestamps based on the modification time of the file, with nanosecond precision. Not possible on Win, AFAICT. So, on a linux box, you can parse the filename and generate a timestamp and touch the mtime of the file. The absolute timestamps don't matter, just need to make sure the deltas in the mtimes correspond to the desired deltas. Then rename or symlink the images to form a smooth numbered sequence. Once done, read as follows: `ffmpeg -f image2 -ts_from_file 2 -i images%d.jpg -vf minterpolate=...`  
  > **username_0**: Awesome! Thanks! I'll give it a try! Can you post this as an answer so I can mark the question resolved if it works?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-01-28. Score: 1 | Accepted answer
  
  The below answer was provided as a comment on the question by [username_1](https://video.stackexchange.com/users/1871/username_1). I've reposted it as an answer so this question can be marked as solved.
  
  ---
  
  > The image2 reader in ffmpeg can assign timestamps based on the modification time of the file, with nanosecond precision. Not possible on Win, AFAICT. So, on a linux box, you can parse the filename and generate a timestamp and touch the mtime of the file. The absolute timestamps don't matter, just need to make sure the deltas in the mtimes correspond to the desired deltas. Then rename or symlink the images to form a smooth numbered sequence. Once done, read as follows: ffmpeg -f image2 -ts\_from\_file 2 -i images%d.jpg -vf minterpolate=... – [username_1](https://video.stackexchange.com/users/1871/username_1)
  
  ---
  
  This worked for me! I was able to use the `touch -d` command to set the timestamp on each file based on the filename, then use `ffmpeg -f image2 -ts_from_file 2 -i %d.png out.mp4` to create the video. Interpolation ended up being time-prohibitive, but shouldn't really be necessary in my final video.
  
  
  ---
  
  