I've got 7 short video clips that are all the same size, frame rate, etc. I want to concatenate them one after another with 2 seconds crossfade, and not lose audio. Taken from an earlier post here I've tried just concatenating/crossfading the first two using:
ffmpeg -i *clip1.mp4 -i *clip2.mp4 \
-filter_complex "[0]fade=t=out:st=0:d=1:alpha=1,setpts=PTS-STARTPTS[va0]; \
[1]fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS[va1]; \
[va0][va1]overlay[outv];[0][1]amix[outa]" \
-map [outv] -map "[outa]" -crf 10 out.mp4
However, this produces a video that immediately fades out the first video, and ends up exactly the same length as the second video (which happens to be 40 seconds). I assume that this is because of "st=0" for the first video [0]? However, if I change that to "st=18" (the first video is 20 seconds long), the resulting combined video (out.mp4) still has the first video immediately fading (and the whole video is still only 40 seconds long instead of 58). However, the audio for the first one does now last 18 seconds (but it is now overlaying the second video and its audio for 18 seconds). Any suggestions of what to try?
No comments:
Post a Comment