How to do 3 operations without rendering 3 times?
I want to do three filter operations in ffmpeg, but without encoding three times: Microsoft Windows [Version 10.0.18362.959]
Video crop
Add cropped video over image
Add text to result video
The operations visualized:
My current code (working but 3x render):
ffmpeg -i kare.mp4 -filter:v "crop=in_w:in_h-472" -c:a copy kirp.mp4 && ffmpeg -y -loop 1 -i 1.jpg -i kirp.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS[V1]; [1:v]setpts=PTS-STARTPTS, scale=1080:608[V2]; [V1][V2]overlay=shortest=1:x=0:y=600" sablon.mp4 && ffmpeg -i sablon.mp4 -vf "drawtext=fontfile=Be.ttf:text='123asd':fontcolor=white:fontsize=105:x=(w-text_w)/2:y=(h-text_h)/3.8" -codec:a copy output.mp4 && del "kirp.mp4" del "sablon.mp4"
'
needed to be escaped with\"
(according to stackoverflow.com/a/59788692)