VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Hello,

    I am trying to create a loop batch file to create split-screen 2x2 mosaic clips. The folder is populated with mp4 clips, and I would like the loop script to work this way:
    -A first mosaic video is created using the 1st, 2nd, 3rd and 4th MP4 clips in the folder.
    -A second mosaic video is created using the 5th, 6th, 7th and 8th MP4 clips in the folder.
    -A third mosaic video is created using the 9th, 10th, 11h and 12th MP4 clips in the folder.
    -etc...

    I have this base script to create mosaic videos in loop, but I can't figure out how to modify it to achieve the result I want:

    Code:
    for %%F in (*.mp4) do (
    	ffmpeg.exe -i %%F -i %%F -i %%F -i %%F -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=960x540 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=960x540 [upperright]; [2:v] setpts=PTS-STARTPTS, scale=960x540 [lowerleft]; [3:v] setpts=PTS-STARTPTS, scale=960x540 [lowerright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=960 [tmp2]; [tmp2][lowerleft] overlay=shortest=1:y=540 [tmp3]; [tmp3][lowerright] overlay=shortest=1:x=960:y=540" -c:v libx264 "D:\VIDEOS\mosaic_4x4\%%F.mp4"
    )
    Do you have an idea how to do modify it to do so? Thank you.
    Quote Quote  
  2. I would separate job on parts, first create timeline (filter 'thumbnail' ) from every clip as separate short sequences, later combine them as mosaic time (my assumption you wish to have animated mosaic).
    Last edited by pandy; 16th Apr 2024 at 12:37.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!