I have videos as follows
video time
======= =========
Area 1:
video1a 0-2000
video1b 2500-3000
video1c 3000-4000
Area 2:
video2a 300- 400
video2b 800- 900
Area 3:
video3a 400- 500
video3b 700- 855
Area 4:
video4a 400- 500
video4b 800- 900
Basically these are security camera outputs and should display in 4 areas:
So far I have the following:
ffmpeg
-i 1.avi -i 2.avi -i 3.avi -i 4.avi
-filter_complex "
nullsrc=size=640x480 [base];
[0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft];
[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright];
[2:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft];
[3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerright];
[base][upperleft] overlay=shortest=1 [tmp1];
[tmp1][upperright] overlay=shortest=1:x=320 [tmp2];
[tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3];
[tmp3][lowerright] overlay=shortest=1:x=320:y=240
"
-c:v libx264 output.mp4
But there are two things I am missing:
- The above is only for 4 video files, I need a way to add additional files to each area (for example video1b should play at its corresponding time after video1a in the same area)
- How do I specify the beginning/ending time as shown above for each file?