"crossfade between 2 videos using ffmpeg"

In the above link I found a way to add fade between 2 videos, but losing the audio. How can I do the same without lose the audio?

This is the command line I'm currently using, which is working very well, just losing the audio:

ffmpeg -i in0.mp4 -i in1.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/TB[va1];[va0][va1]overlay[outv]" -map [outv] -crf 10 out.mp4


ffmpeg -i in0.mp4 -i in1.mp4
         [0][1]amix[outa]" -map [outv] -map "[outa]" -crf 10 out.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.