ffmpeg can do a better job than this if you are pulling and pushing that after conversion. it's usually better if you don't convert at all, and let the streaming server handle that part.
i've never seen this level of b0rk on a video conversion before... stuttering, yeah but not frames looping like this