I am afraid that this solution is not so simple to describe in a few lines of code. I think you can start with the code for the face detection example in openCV, but to find people from above, you need a different classifier. You need to find such a classifier (I'm sure you can find it somewhere, or you can ask the guy who posted the video that you mentioned), and if you do not get it, you need to train such a classifier yourself.
An alternative would be to subtract from the link the background image, the current foreground frame, the result is objects passing on the screen, however you cannot distinguish between people and other objects.
source share