Grab+analyze stream frames and output the result to overlay

Have a look at OpenCV. That seems to be what you’re after. We have a similar system on TrumpSC’s channel, with card draw/game event detection in Hearthstone using OpenCV.