Answers.Body: <p>If all TIFFs have the same properties, and are named sequentially like image0001.tif, then you can use</p>
  <pre><code>ffmpeg -i image%04d.tif -i my.png -filter_complex &quot;[1][0]scale2ref[i][m];[m][i]overlay&quot; out%04d.tif
  </code></pre>
  <p>This will generate images with the overlay named as follows</p>
  <pre><code>out0001.tif
  out0002.tif
  ...
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-11T04:45:54.790Z
Answers.LastActivityDate: 2020-11-11T04:45:54.790Z
Answers.UserDisplayName: Gyan
Body: <p>I am trying to overlay a png image onto a series of images (a few hundred images), I will later take this series of images with the overlay and construct a movie out of the series of images. I don't know too much about ffmpeg and I have just recently started playing with it for converting and editing media files but I have found something that works for combining the png with one tif image:</p>
  <p><strong>ffmpeg -i my.png -i my.tif -filter_complex &quot;[1][0]scale2ref[i][m];[m][i]overlay[v]&quot; -map &quot;[v]&quot; -map 0:a? -ac 2 output.tif</strong></p>
  <p>This is what I have so far, which allows me to overlay my png on a single tif image. I would like to do this for every single tif image that I have in my folder (hundreds) of tif images.</p>
  <p>Is there a way to instruct ffmpeg to do such a process?</p>
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-06T12:42:06.980Z
Comments.Text: Are all the TIFFs with the same properties, like resolution?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-07T21:44:49.827Z
Comments.Text: @Gyan Yes, the resolution of all of the tif images and the png image is the same. Specifically these images are electron micrographs and I was hoping to overlay a graphic on top of all of the electron micrographs. I was able to generate a macro on ImageJ to overlay the graphic onto all of the tifs. However, I am still curious if there is a way to accomplish this type of "water-marking" with ffmpeg as that may prove to be useful in the future. I suppose that I would need a conditional statement for the tif images, but I am not sure how to implement such a thing in ffmpeg.
Comments.UserDisplayName: Timecode
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-08T03:59:24.123Z
Comments.Text: How are the TIFFs named?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-10T23:31:52.833Z
Comments.Text: @Gyan The tif images are all organized by their capture frame in a numerical sequence. Eg. image0001.tif, image0002.tif, etc.
Comments.UserDisplayName: Timecode
Tags: <video><ffmpeg><editing><linux>
Title: ffmpeg: Placing an overlay over multiple images
UserDisplayName: Timecode
ThreadText: # ffmpeg: Placing an overlay over multiple images
  
  (Asked by: username_0 on 2020-11-06)
  
  I am trying to overlay a png image onto a series of images (a few hundred images), I will later take this series of images with the overlay and construct a movie out of the series of images. I don't know too much about ffmpeg and I have just recently started playing with it for converting and editing media files but I have found something that works for combining the png with one tif image:
  
  **ffmpeg -i my.png -i my.tif -filter\_complex "[1][0]scale2ref[i][m];[m][i]overlay[v]" -map "[v]" -map 0:a? -ac 2 output.tif**
  
  This is what I have so far, which allows me to overlay my png on a single tif image. I would like to do this for every single tif image that I have in my folder (hundreds) of tif images.
  
  Is there a way to instruct ffmpeg to do such a process?
  
  Thanks
  
  **Tags:** video, ffmpeg, editing, linux
  
  > **Comments:**
  > **username_1**: Are all the TIFFs with the same properties, like resolution?  
  > **username_0**: @username_1 Yes, the resolution of all of the tif images and the png image is the same. Specifically these images are electron micrographs and I was hoping to overlay a graphic on top of all of the electron micrographs. I was able to generate a macro on ImageJ to overlay the graphic onto all of the tifs. However, I am still curious if there is a way to accomplish this type of "water-marking" with ffmpeg as that may prove to be useful in the future. I suppose that I would need a conditional statement for the tif images, but I am not sure how to implement such a thing in ffmpeg.  
  > **username_1**: How are the TIFFs named?  
  > **username_0**: @username_1 The tif images are all organized by their capture frame in a numerical sequence. Eg. image0001.tif, image0002.tif, etc.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-11-11. Score: 0 | Accepted answer
  
  If all TIFFs have the same properties, and are named sequentially like image0001.tif, then you can use
  
  ```
  ffmpeg -i image%04d.tif -i my.png -filter_complex "[1][0]scale2ref[i][m];[m][i]overlay" out%04d.tif
  
  ```
  
  This will generate images with the overlay named as follows
  
  ```
  out0001.tif
  out0002.tif
  ...
  
  ```
  
  
  ---
  
  