mplayer seamless loop in Raspberry Pi


Have you ever tried to run a video on an infinite loop with mplayer?

You will find that most players (including VLC) will do a ‘restart’ after each loop. That stuttering is very annoying when you are trying to build a kiosk mode screen display.

We can achieve a seamless infinite video loop with mplayer with a command like this:

mplayer -fs videofile.xyz -loop 0

Please note the “-loop 0” option is at the end. If you put this option before the file name, it will cause a restart on every loop. Apparently, this behavior comes from a very old quirk