How do you create a crossfade transition between multiple videos in FFMPEG?

こ雲淡風輕ζ 提交于 2019-12-10 11:08:19

问题


I am currently looping MP4 videos with audio through FFMPEG. Here is the code

del intermediate1.ts
del f.txt
echo file intermediate1.ts>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt
echo file intermediate1.ts>>f.txt

ffmpeg -i "SHORT MUSIC.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts -nostdin
ffmpeg -f concat -i f.txt -c copy -bsf:a aac_adtstoasc "LONG MUSIC.mp4" -nostdin

However, the transition between each instance of the videos is not smooth. It cuts off as the next instance is shown. Would there be a way create a blend/crossfade transition for the videos?

I have come across this method however, it is only for 2 videos https://superuser.com/questions/778762/crossfade-between-2-videos-using-ffmpeg

Hope someone can help me! Thank you very much!!

来源:https://stackoverflow.com/questions/34606097/how-do-you-create-a-crossfade-transition-between-multiple-videos-in-ffmpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!