Answers.Body: <p>The blend filter requires both inputs to have the same resolution. You can use the scale2ref filter to resize the overlay.</p>
  
  <p><code>ffmpeg -i dogs.mp4 -i red.jpg -filter_complex '[1:v][0:v]scale2ref[ckout][vid];[vid][ckout]blend=all_mode='multiply'[out]' -map '[out]' output.mp4</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T16:18:47.633Z
Answers.Text: `scale2ref` That's a handy filter. So it scales the res of the first input `[1:v]` to match the second `[0:v]`?
Answers.UserDisplayName: user3643
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T16:20:31.990Z
Answers.Text: Yes, it just gives access to the attributes of a reference video. The target size does not have to be the same as the reference. That's the behaviour of the default values. See https://ffmpeg.org/ffmpeg-filters.html#scale2ref
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-14T02:59:29.583Z
Answers.Text: Hmm, interesting, the scale works but the error still happens `First input link top parameters (size 1920x1080, SAR 0:1) do not match the corresponding second input link bottom parameters (1920x1080, SAR 1:1)` `Failed to configure output pad on Parsed_blend_1` I'm using 3.4.
Answers.UserDisplayName: mandaputtra
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-14T04:41:13.000Z
Answers.Text: I got it working with this. `ffmpeg -i red.jpg -i dogs.mp4 -filter_complex "[0][1]scale2ref[a][b];[a]setdar=16/9[c];[b]setdar=16/9[d];[c][d]blend=all_mode=overlay:all_opacity=1[out]" -map "[out]" output6.mp4` actually your command should be right. 
  
  
  can't edit my comment because of StackOverflow so I add a new one
Answers.UserDisplayName: mandaputtra
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-14T04:45:14.187Z
Answers.Text: Recent versions of ffmpeg blend filter no longer require matching aspect ratios.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T15:59:23.327Z
Answers.LastActivityDate: 2019-05-13T15:59:23.327Z
Answers.UserDisplayName: Gyan
Body: <p>So I want to create videos that had a red overlay, effect and I assume that <code>blend</code> is the right options filter for this. Here my command :</p>
  
  <pre><code>ffmpeg -i dogs.mp4 -i red.jpg -filter_complex '[1:v]scale=1280:720[ckout];[0:v][ckout]blend=all_mode='multiply'[out]' -map '[out]' output.mp4
  </code></pre>
  
  <p>But when i tried this I always got : </p>
  
  <pre><code>Press [q] to stop, [?] for help
  [swscaler @ 00000263f19a9560] deprecated pixel format used, make sure you did set range correctly
  [Parsed_blend_1 @ 00000263f192fa20] First input link top parameters (size 1920x1080, SAR 0:1) do not match the corresponding second input link bottom parameters (1280x720, SAR 1:1)
  [Parsed_blend_1 @ 00000263f192fa20] Failed to configure output pad on Parsed_blend_1
  Error reinitializing filters!
  Failed to inject frame into filter network: Invalid argument
  Error while processing the decoded data for stream #0:0
  Conversion failed!
  </code></pre>
  
  <p>What is the right command for this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T11:01:24.847Z
Comments.Text: Do you want to add a red tint on top?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T15:47:09.767Z
Comments.Text: @Gyan Yes, I'm blending red tint png actually and, overlay it on top of video with multiply rule
Comments.UserDisplayName: mandaputtra
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T16:16:27.507Z
Comments.Text: As Gyan's answer indicates, any filter involving two or more videos being put together in any way, requires that those videos have the same resolutions. Exceptions would be filters like the vstack where only one line of the resolutions need to match. Scale red.jpg before starting the blend. Several ways to do this, Gyan's solution being pretty handy.
Comments.UserDisplayName: user3643
Tags: <video><ffmpeg><effects>
Title: ffmpeg - blend video with images
UserDisplayName: mandaputtra
ThreadText: # ffmpeg - blend video with images
  
  (Asked by: username_0 on 2019-05-13)
  
  So I want to create videos that had a red overlay, effect and I assume that `blend` is the right options filter for this. Here my command :
  
  ```
  ffmpeg -i dogs.mp4 -i red.jpg -filter_complex '[1:v]scale=1280:720[ckout];[0:v][ckout]blend=all_mode='multiply'[out]' -map '[out]' output.mp4
  
  ```
  
  But when i tried this I always got :
  
  ```
  Press [q] to stop, [?] for help
  [swscaler @ 00000263f19a9560] deprecated pixel format used, make sure you did set range correctly
  [Parsed_blend_1 @ 00000263f192fa20] First input link top parameters (size 1920x1080, SAR 0:1) do not match the corresponding second input link bottom parameters (1280x720, SAR 1:1)
  [Parsed_blend_1 @ 00000263f192fa20] Failed to configure output pad on Parsed_blend_1
  Error reinitializing filters!
  Failed to inject frame into filter network: Invalid argument
  Error while processing the decoded data for stream #0:0
  Conversion failed!
  
  ```
  
  What is the right command for this?
  
  **Tags:** video, ffmpeg, effects
  
  > **Comments:**
  > **username_1**: Do you want to add a red tint on top?  
  > **username_0**: @username_1 Yes, I'm blending red tint png actually and, overlay it on top of video with multiply rule  
  > **username_2**: As username_1's answer indicates, any filter involving two or more videos being put together in any way, requires that those videos have the same resolutions. Exceptions would be filters like the vstack where only one line of the resolutions need to match. Scale red.jpg before starting the blend. Several ways to do this, username_1's solution being pretty handy.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-13. Score: 3 | Accepted answer
  
  The blend filter requires both inputs to have the same resolution. You can use the scale2ref filter to resize the overlay.
  
  `ffmpeg -i dogs.mp4 -i red.jpg -filter_complex '[1:v][0:v]scale2ref[ckout][vid];[vid][ckout]blend=all_mode='multiply'[out]' -map '[out]' output.mp4`
  
  > **Comments:**
  > **username_2**: `scale2ref` That's a handy filter. So it scales the res of the first input `[1:v]` to match the second `[0:v]`?  
  > **username_1**: Yes, it just gives access to the attributes of a reference video. The target size does not have to be the same as the reference. That's the behaviour of the default values. See https://ffmpeg.org/ffmpeg-filters.html#scale2ref  
  > **username_0**: Hmm, interesting, the scale works but the error still happens `First input link top parameters (size 1920x1080, SAR 0:1) do not match the corresponding second input link bottom parameters (1920x1080, SAR 1:1)` `Failed to configure output pad on Parsed_blend_1` I'm using 3.4.  
  > **username_0**: I got it working with this. `ffmpeg -i red.jpg -i dogs.mp4 -filter_complex "[0][1]scale2ref[a][b];[a]setdar=16/9[c];[b]setdar=16/9[d];[c][d]blend=all_mode=overlay:all_opacity=1[out]" -map "[out]" output6.mp4` actually your command should be right.    can't edit my comment because of StackOverflow so I add a new one  
  > **username_1**: Recent versions of ffmpeg blend filter no longer require matching aspect ratios.  
  
  ---
  
  