Say I had 4 videos with the following names:

  • Main Video.mov
  • Top Left.mov
  • Top Right.mov
  • Top Mid.mov

and I wanted to have "Main Video" play with a picture in picture effect with boxes of videos playing in the top left, top right and top mid. Each box would have the video that is similarly named.

This command will do picture in picture for 2 videos, with one video in the lower right.

ffmpeg -i 2013-07-31\ 231548.MOV -vf "movie=2013-07-31\ 231722.MOV, scale=iw/5:ih/5 [small]; [in][small] overlay=main_w*0.77:main_h*0.77 [out]" -strict -2 output.mov

Can someone help me update this command to work with the 4 files I mentioned above?


  • 1
    Can you include an image representing what you would like to achieve? Please include the complete ffmpeg console output from your command. How do you want to deal with any audio? Also see Multiple Overlay Movies in FFmpeg. – llogan Aug 25 '13 at 8:04

Is this what you want:


specifically the section "multiple input overlay in 2x2 grid".

code used there also includes other filters such as negate, but the overlay and scale functions are well explained.

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.