FORUMS: list search recent posts

using nullsrc + overlay to make a 2x2 multi-screen video - how can I set length to longest of the 4 input videos?

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Alec Turner
using nullsrc + overlay to make a 2x2 multi-screen video - how can I set length to longest of the 4 input videos?
on Aug 16, 2017 at 12:16:28 pm
Last Edited By Alec Turner on Aug 16, 2017 at 3:55:42 pm

Hi folks, brand new to this forum, wanted to ask a question about the following recipe which I grabbed off the internet and am using to make a 2x2 multi-screen video from 4 input videos ..

ffmpeg -i vid1.mp4 -i vid2.mp4 -i vid3.mp4 -i vid4.mp4 -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 [tmp1]; [tmp1] [upperright] overlay=x=960 [tmp2]; [tmp2] [lowerleft] overlay=y=540 [tmp3]; [tmp3] [lowerright] overlay=x=960:y=540" -c:v libx264 vid1234.mp4

The original recipe had "shortest=1" against each of the "overlay" statements but I want my final video to be the length of the longest video not the shortest. Since "longest" is default I simply removed the "shortest=1" but what I'm now seeing is that this basically runs for ever (presumably because of the "nullsrc" input) or until I hit 'q'.

How can I specify that I want my final video to be the length of the longest of the videos excluding the "nullsrc" input?

Thanks in advance for any help on this!


Return to posts index

Gyan Doshi
Re: using nullsrc + overlay to make a 2x2 multi-screen video - how can I set length to longest of the 4 input videos?
on Aug 17, 2017 at 10:14:08 am

Keep the shortest=1 in the first overlay filter i.e. [base] [upperleft] overlay=shortest=1 [tmp1]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]