Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Overlay Movies in FFMPEG
    text
    copied!<p>I was trying to make a 3 columns by 2 row overlay in FFMEG</p> <p>I found this command which works great for a 2x2 movie overlay</p> <pre><code>ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*2:ih*2[a];[1:0]scale=iw/2:ih/2[b];[2:0]scale=iw/2:ih/2[c];[3:0]scale=iw/2:ih/2[d];[a][b]overlay=w[x];[x][c]overlay=0:h[y];[y][d]overlay=w:h,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid1':x=35:y=35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid2':x=(w/2)+35:y=35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid3':x=35:y=(h/2)+35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid4':x=(w/2)+35:y=(h/2)+35" output.mp4 </code></pre> <p>(Same command just multiple lines only for readability)</p> <pre><code>ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*2:ih*2[a];[1:0]scale=iw/2:ih/2[b]; [2:0]scale=iw/2:ih/2[c];[3:0]scale=iw/2:ih/2[d];[a][b]overlay=w[x]; [x][c]overlay=0:h[y];[y][d]overlay=w:h,drawtext=fontsize=12:fontcolor=white: fontfile=/Windows/Fonts/arial.ttf:text='vid1':x=35:y=35,drawtext=fontsize=12: fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid2':x=(w/2)+35:y=35,drawtext=fontsize=12:fontcolor=white: fontfile=/Windows/Fonts/arial.ttf:text='vid3':x=35 :y=(h/2)+35,drawtext=fontsize=12:fontcolor=white: fontfile=/Windows/Fonts/arial.ttf:text='vid4':x=(w/2)+35:y=(h/2)+35" output.mp4 </code></pre> <p>I had trouble adding the 2 other movies, I know you add this</p> <pre><code>ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -i video5.mp4 -i video6.mp4 </code></pre> <p>and this </p> <pre><code>-filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*3:ih*2[a]; </code></pre> <p>but positioning the last 2 movies and text is where I am lost</p> <p>image per request [edit] of what I want to do in organizing the overlays</p> <p><img src="https://i.stack.imgur.com/1SOUq.png" alt="overlay of 6 videos 3x2 with text on top"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload