FFMPEG - Youtube MP4 video stream loop?
You should be able to achieve this by prepending the source with stream_loop parameter and -1 value specifying indefinite looping.

Replace

-i "$SOURCE" -deinterlace \


with

-stream_loop -1 -i "$SOURCE" -deinterlace \


See https://ffmpeg.org/ffmpeg.html#Main-options