Speed up by reducing recursive process.
Speed up by changing image resize algorithm (resample:smooth -> resize:nearest neighbor)
Speed up by changing ffmpeg parameter. (You also have to change param on admin panel: add "-fs ???M -s 640x360")