talha131/bmtool

Fix videoLoop to use single method to create video with and without crossfade

Closed this issue · 0 comments

Video has artifacts.

See this parameter

[0:v]trim=start=0:end=15,setpts=PTS-STARTPTS[clip1]; [0:v]trim=start=0:end=15,setpts=PTS-STARTPTS[clip2]; [0:v]trim=start=15:end=15,setpts=PTS-STARTPTS[clip3]; [0:v]trim=start=15:end=15,setpts=PTS-STARTPTS[fadeoutsrc]; [0:v]trim=start=0:end=0,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=0:alpha=1[fadein]; [fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=0:alpha=1[fadeout]; [fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo]; [fadeoutfifo][fadeinfifo]overlay[crossfade]; [crossfade] split=3 [cf1][cf2][cf3] ; [clip2] split=3 [cl1][cl2][cl3] ; [clip1][cf1][cl1][cf2][cl2][cf3][cl3][clip3]concat=n=8:v=1[output]

Several items like clip2, clip3, fadein, fadeout are not required. They can be enclosed in if conditional.

What we need to do is to split clip1 required number of times and then concatenate it.

Better way is to create a new method that generates filter_complex. It would be cleaner.