Okay so a Rasp pi 3+
you compiled from source? How are you running AM? Do you have raspain installed? Is it retropie? is it running ot top of mate? This only happens when you run attractmode? What if you leaving running without attractmode going?
These are thing we need to know to help.
Also I have to ask..what format are your video snaps in? The PI
can run 800x600 @60 FPS However you will get better results if you lower them all to 320x240 @30 FPS.
As much as i like AM the pi is just a little under powered for some themes. Attractmode on the highend good looking wow setting themes need to be run on a PC (or a stronger SBC) One day I hope that AM can run smooth on the pi...I like emulationstation...but yeah I am bias a little
(AM is easier to set up honestly)