Can you spot how this "perpetual motion" machine works?

Yep. Hitting those black stops absorbs energy due to friction. Not to mention the friction of just the balls rolling.