[FFmpeg-user] Cross fading between multiple videos problem

Harsh Bhavsar harsh.bhavsar at equestsolutions.net
Tue Jun 14 13:00:18 CEST 2016


Right now i am using cross fading between two same videos(.mp4) I followed your documentation . For cross effect between two videos running perfect  . But when i tried to do with multiple videos join with cross fade effect(1 sec) i got so many problems and issues regarding complex filter[]. I didnt find solution for mutiple videos join with cross fade effect 

I tried this command for two videos merging with cross fade effect

ffmpeg -i big_buck.mp4 -i big_buck.mp4 -an -filter_complex "[0:v]trim=start=0:end=4,setpts=PTS-STARTPTS[firstclip]; [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; [0:v]trim=start=4:end=5,setpts=PTS-STARTPTS[fadeoutsrc]; [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein]; [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout]; [fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo]; [fadeoutfifo][fadeinfifo]overlay[crossfade]; [firstclip][crossfade][secondclip]concat=n=3[output]; [0:a][1:a] acrossfade=d=1 [audio]" -map "[output]" -map "[audio]" result.mp4 -y

when i tried for 5 videos merging with Cross fade effect in each videos after 1st  video.  
I didn't find any solution on your website and also from various forums and yours offical forum also
Look into it Please help  

Thank you.
Harsh Bhavsar

More information about the ffmpeg-user mailing list