cross fade - ffmpeg - make a seamless loop with a crossfade -


i want apply crossfade last x frames of video first x frames in order obtain seamless loop.

how can that?

let's video 30 seconds long , fade 1 second long. command be

ffmpeg -i video.mp4 -filter_complex         "[0]split[body][pre];          [pre]trim=duration=1,format=yuva420p,fade=d=1:alpha=1,setpts=pts+(28/tb)[jt];          [body]trim=1,setpts=pts-startpts[main];          [main][jt]overlay"   output.mp4 

the video split 2 identical streams. first trimmed first second, has alpha channel added, , faded. last filter on first stream delays 28 seconds since final output have trimmed off first second of original clip , overlap last second. 2nd stream trimmed start @ t=1 , processed first stream overlaid on 2nd. since alpha channel faded in first stream, crossfades in.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -