Go to preferences -> advanced -> mplayer/mpv and type this in the “options” field:
--loop-file=inf