How to loop video with varying sizes over static image using ffmpeg, (has frame stutter issue)

'ffmpeg -loop 1 -i "' + Background + '" -i "' + curvideosloc + '" -filter_complex "overlay=(W-w)/2:(H-h)/2:shortest=1,format=yuv420p" "' + finalvideoloc + '"'

The above is the command that I currently use to set a background (which is 1080p) over a video (which changes in size throughout the video to a max size of 1800 by 900), however when I do this, at most (for some reason not all) points in which the video file size changes it has a stutter where it just displays the static background then puts the video back on top and I can't figure out why. Any ideas?