Mirroring Windows

August 18, 2025

—

obs-studio

An infinite tunnel of windows. When OBS Studio captures the screen it is running on, its own preview ends up inside the capture: every frame shows the previous one, a bit smaller, again and again. With cmatrix raining in the terminal behind it, the result looks like a trip down the Matrix. Video on Mastodon #matrix #linux.

Figure 1: OBS Studio capturing its own window, with cmatrix in the background

Contents

Setup

Install OBS Studio and cmatrix, then start the digital rain in a terminal and leave it full screen:

$ sudo apt install obs-studio cmatrix

$ cmatrix -b

Mirror

In OBS, add a Screen Capture (PipeWire) source and share the whole screen (not a single window). Keep the OBS window open on top of the terminal: the preview shows the screen, which already contains the preview, which contains the screen…

  • Moving or resizing the OBS window changes where the tunnel bends.
  • Opening a menu copies it into every level of the tunnel, as in the picture above.
  • The depth is limited by the preview scale: each copy is smaller until it is just a few pixels.

This is video feedback, the same effect as pointing a camera at the screen that shows its own image.