I just got a brand new s4 i9500. And when I play videos from YouTube, whatsapp through Samsung player or vlc etc my screen starts flickering like crazy and then blacks out.
To fix I went to developer settings and enabled a function called " Turn off hardware overlays"
This instantly solved...