ffmpeg - make a seamless loop with a crossfade
问题 I want to apply a crossfade to the last x frames of a video with the first x frames in order to obtain a seamless loop. How can I do that? 回答1: Let's say your video is 30 seconds long and your fade is 1 second long. Your command would 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 is split into two identical streams. The