How to use object as clipping - exclusion mask?

Hi everyone,
I have an object that does not have to be visible and moves around the place (3D space). This object is in front of a plane with a picture or a video playing on it.
What I want to do is to render everything that is behind the moving object (z-buffer speaking) and not render the parts that are supposed to be visible.

example:

OK.
I have found an obvious answer that is
“with a kind of stencil buffer”.
My problem on this is that I don’t know anything about shaders or shader scripting and so far I have find only specified discussions that don’t understand anything.
So please, anyone that can give a script / link to download / shader and specific instructions on what variable does what, in the stencil shader, so I get into something…

Or maybe I am completely wrong on this, so, any other advice.
Anything helpful would be appreciated.
Thanx.