<p>I think you meant guys. Anyway, <a href="https://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction" rel="nofollow noreferrer">filtergraph</a> uses label to handle one filter after another. In your case, you may try</p>
<pre><code>ffmpeg -y -i vide.ts -i logo.png  -filter_complex &quot;[0:v]crop=1280:720:0:0[crop]; [crop]overlay=(W-w)/2:(H-h)/2[out]&quot; -map [out] -map 0:a crop_overlay.mp4
</code></pre>

CC BY-SA 4.0
2021-12-13T13:06:10.347Z
2021-12-13T13:06:10.347Z
xer-rex
<p>I have two command:</p>
<pre><code>ffmpeg -i in.mp4 -vf crop='1280:720:0:0' -acodec copy croped.mp4
ffmpeg -loop 1 -i 1.jpg -i  croped.mp4 -filter_complex 'overlay=(W-w)/2:(H-h)/2:shortest=1,format=yuv420p' -c:a copy result.mp4
</code></pre>
<p>Can these be combined into a single command? If so, how?</p>

<ffmpeg><filter>
Can I crop and overlay at same time when useing ffmpeg?
袁胜红
# Can I crop and overlay at same time when useing ffmpeg?

(Asked by: username_0 on 2021-12-13)

I have two command:
ffmpeg -i in.mp4 -vf crop='1280:720:0:0' -acodec copy croped.mp4
ffmpeg -loop 1 -i 1.jpg -i  croped.mp4 -filter_complex 'overlay=(W-w)/2:(H-h)/2:shortest=1,format=yuv420p' -c:a copy result.mp4

Can these be combined into a single command? If so, how?

**Tags:** ffmpeg, filter


---

## 1 answers

### Answer by username_1 on 2021-12-13. Score: 1

I think you meant guys. Anyway, filtergraph uses label to handle one filter after another. In your case, you may try
ffmpeg -y -i vide.ts -i logo.png  -filter_complex "[0:v]crop=1280:720:0:0[crop]; [crop]overlay=(W-w)/2:(H-h)/2[out]" -map [out] -map 0:a crop_overlay.mp4


---

