[FFmpeg-user] Properly adding a cross fade to a video of 1 second or so

David McKay david.mckay1987 at gmail.com
Tue Apr 12 18:11:58 CEST 2016


Hi All,

I am trying to add a cross fade to a video of around 1 second each. Please
find my input and the ouptut here : http://pastebin.com/AG3UJguT . The
problem is the resultant output is different in terms of frame rates and
other characteristics to the input video.

Command : -i /userVideos/cutterVID_20160412_0851061460476266191.mp4 -i
/userVideos/cutterVID_20160412_0851051460476265866.mp4 -r 30.01 -f lavfi -i
color=black:s=1280x720 -filter_complex
[0:v]fade=t=out:st=0:d=1:alpha=1,setpts=PTS-STARTPTS[va0];[1:v]fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS[va1];[2:v]trim=duration=1.0[over];[over][va0]overlay[over1];[over1][va1]overlay[outv]
-vcodec libx264 -map [outv]
/userVideos/faderVID_20160412_0851061460476266210.mp4

I tried to set the frame rate "-r 30.01" but even then there are other
parameters different. Is there a way to crossfade 2 videos keeping the
characteristics of the original videos in place? Both the videos have the
same characteristics as they were 720p videos.

Thanks
David


More information about the ffmpeg-user mailing list