One source: the whole screen (a game, a desktop) with the person composited
into a corner. It is how OBS records and how any stream VOD looks, and it is
the case screencast_layout got wrong: there the speaker band is a large crop
taken AROUND the face, which on a full-screen source means more screen. On the
measured Excel clip the output showed the same spreadsheet twice, whole and
enlarged.
What is needed is the inset's own rectangle, and finding it has three traps,
each of which cost an iteration:
- The inset does not touch two edges. YOLO returns an upper-body box that stops
at the chest, so a webcam pinned to the right side measured 18% clear of the
bottom and the "corner" filter threw it away. The test that works is subject
SMALL and OFF-CENTRE.
- A presenter standing in front of a screen passes any geometric filter. What
separates them is that a composited inset DOES NOT MOVE: 3-11px between
samples versus 316px for a person. With a plain min-max range the filter was
too brittle (one lost sample killed three good detections), so it clusters
around the median and requires a majority.
- The height cannot be scaled from the detection: for a webcam of about 325x180
YOLO returned 246x86, and growing that shape still cut the head off. It is
derived from the width assuming 16:9 and pinned to the edge the inset touches.
The filtergraph keeps the screen at full width (the HUD and the edges are the
content) and the camera band takes its height from the inset's real aspect:
forcing a fixed ratio stretched faces 12% horizontally.
Verified on 10 clips: finds the 4 with a composited camera and rejects the 6
without one (presenter in front of a screen, talking heads, presenter
composited full-screen). The miss is a 720p clip whose webcam is too small for
either detector.