<p>You would use scale2ref to match the fx clip with the artwork and then the blended result with the demo reference. For correct results, blend will have to work with RGB inputs, so those inputs have to be converted first.</p>
<p><code>ffmpeg -framerate 30 -i artwork.jpg -i video.mp4 -i demo_output.mp4 -filter_complex &quot;[1][0]scale2ref[fx][bg];[bg]format=gbrp[bg];[fx]format=gbrp[fx];[fx][bg]blend=all_mode=lighten[mix];[mix][2]scale2ref[v][ref];[v]setsar=1[v];[ref]nullsink&quot; -pix_fmt yuv420p -map [v] out.mp4</code></p>

CC BY-SA 4.0
2022-12-10T12:51:35.007Z
2022-12-10T12:51:35.007Z
Gyan
<p>I have a video, <code>video.mp4</code>, and an image, <code>artwork.png</code></p>
<p>I would like, to use FFmpeg:</p>
<ul>
<li>To display the <code>video.mp4</code> effect inside the image <code>artwork.png</code></li>
<li>If possible, resize <code>output.mp4</code> as per the demo <code>demo_output.mp4</code></li>
</ul>
<p>Is this possible?</p>
<p>Resources: <a href="https://www.dropbox.com/transfer/AAAAAGgUAt5aTw0W5DYH75y-CvJTKQUqxXatnMPNjHBxpz4DDiOH9IM" rel="nofollow noreferrer">https://www.dropbox.com/transfer/AAAAAGgUAt5aTw0W5DYH75y-CvJTKQUqxXatnMPNjHBxpz4DDiOH9IM</a></p>
<p>Have tried :
<code>ffmpeg -i video.mp4 -i artwork.jpg -filter_complex '[1:v][0:v]scale2ref[ckout][vid];[vid][ckout]blend=all_mode='lighten'[out]' -map '[out]' output.mp4</code></p>

CC BY-SA 4.0
2022-12-07T15:16:11.343Z
Will look at it tomorrow. Ping if no answer.
Gyan
CC BY-SA 4.0
2022-12-08T01:50:27.003Z
@Gyan yet no answer was found
Ashish Chaturvedi
<ffmpeg><video>
FFMPEG : Add video (partial video effect) under the image with ffmpeg
Ashish Chaturvedi
# FFMPEG : Add video (partial video effect) under the image with ffmpeg

(Asked by: username_0 on 2022-12-06)

I have a video, `video.mp4`, and an image, `artwork.png`

I would like, to use FFmpeg:

* To display the `video.mp4` effect inside the image `artwork.png`
* If possible, resize `output.mp4` as per the demo `demo_output.mp4`

Is this possible?

Resources: <https://www.dropbox.com/transfer/AAAAAGgUAt5aTw0W5DYH75y-CvJTKQUqxXatnMPNjHBxpz4DDiOH9IM>

Have tried :
`ffmpeg -i video.mp4 -i artwork.jpg -filter_complex '[1:v][0:v]scale2ref[ckout][vid];[vid][ckout]blend=all_mode='lighten'[out]' -map '[out]' output.mp4`

**Tags:** ffmpeg, video

> **Comments:**
> **username_1**: Will look at it tomorrow. Ping if no answer.  
> **username_0**: @username_1 yet no answer was found  

---

## 1 answers

### Answer by username_1 on 2022-12-10. Score: 0

You would use scale2ref to match the fx clip with the artwork and then the blended result with the demo reference. For correct results, blend will have to work with RGB inputs, so those inputs have to be converted first.

`ffmpeg -framerate 30 -i artwork.jpg -i video.mp4 -i demo_output.mp4 -filter_complex "[1][0]scale2ref[fx][bg];[bg]format=gbrp[bg];[fx]format=gbrp[fx];[fx][bg]blend=all_mode=lighten[mix];[mix][2]scale2ref[v][ref];[v]setsar=1[v];[ref]nullsink" -pix_fmt yuv420p -map [v] out.mp4`


---

