Reduce VLC CPU use (DerGenaue's code, adapted)