I have four videos (no audio) which I am able to stitch together using this command. I am also able to add an overlay on a single video with this command.

Is it possible to combine both of these operations with a single ffmpeg command (i.e. stack four 960x540 videos as in the first link, then add a 1920x1080 overlay onto the resulting 1920x1080 video)? Thanks.


Add the overlay to the result of the stacked videos.


ffmpeg -i input0 -i input1 -i input2 -i input3 -i overlay -filter_complex \
"[0:v][1:v]hstack[top]; \
 [2:v][3:v]hstack[bottom]; \
 [top][bottom]vstack[v];[v][4:v]overlay=0:0[v]" \
-map "[v]" output.mp4
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.