Play a video inside the Windows Task Manager performance chart — FFmpeg decodes the frames, an edge pass turns them into neon line art, and a click-through overlay paints them on top of the live CPU graph.
Task Manager → Performance → CPU
┌───────────────────────────────────────────────┐
│ % Utilization │
│ 100 ┤ │
│ │ ╱╲ ┌─┐ ╱╲ ← your video │
│ 50 ┤ ╱╲ ╱ ╲ │ │ ╱ ╲ ╱╲ as edges │
│ │ ╱ V ╲__╱ ╲_╱ ╲_╱ ╲ │
│ 0 ┴────────────────────────────────────── │
└───────────────────────────────────────────────┘
- FFmpeg does the decoding through a
rawvideopipe (-re, so playback is real time). edgedetect+eqrun inside the filter graph, the player only uploads the mask.- Direct2D turns the mask into premultiplied pixels, tinted with the Task Manager blue.
- The overlay never takes focus and never eats clicks — Task Manager keeps working.
| Frame decoded by FFmpeg | Same frame after the edge pass |
|---|---|
![]() |
![]() |
The right image is the actual player output (edge mask tinted with the Task Manager blue and composited over a dark background). Sample frame: picsum.photos.
-
Windows 10 2004 (20H1) / Windows 11, x64
-
FFmpeg —
ffmpeg.exe(and optionallyffprobe.exe) -
One of the two release zips:
TaskmgrVideo-<ver>-win-x64.zip— ~1 MB, needs the .NET 8 Desktop RuntimeTaskmgrVideo-<ver>-win-x64-with-ffmpeg.zip— ~70 MB, the same plus a bundled FFmpeg (LGPL shared build)TaskmgrVideo-<ver>-win-x64-standalone.zip— ~66 MB, self-contained, no runtime installTaskmgrVideo-<ver>-win-x64-standalone-with-ffmpeg.zip— ~135 MB, the same plus bundled FFmpeg
Pick a
with-ffmpegpackage if you do not have FFmpeg onPATH; otherwise the smaller package plus your own FFmpeg works. Bundled binaries live inffmpeg\next to the exe and are used automatically; most of that download is libavcodec, not the player.
Put ffmpeg.exe… anywhere findable:
TaskmgrVideo.exefolder, or anffmpeg\/ffmpeg\bin\/tools\subfolder- anywhere on
PATH - or point Advanced → Set ffmpeg path… at it
- Unzip, run
TaskmgrVideo.exe(it lives in the tray). - Open Task Manager → Performance → CPU.
- Tray → Choose video…, then Play video (or double-click the tray icon).
- Switch to Task Manager: the video starts playing the moment the chart is in front, and it hides itself when Task Manager loses focus.
Tray menu:
| Item | What it does |
|---|---|
| Play video / Stop | Start or stop the decode session |
| Choose video… | Pick the source file (mp4/mkv/mov/webm/avi/gif/…) |
| Loop | Loop the clip (default on) |
| Fit | Cover (fill + crop, default) · Contain (letterbox) · Stretch |
| Style | Edge outline only (default) · Plain video |
| Edge color | Task Manager blue (default) · White · Amber |
| Edge strength | Low · Medium · High — how many edges survive |
| Backdrop | Darken the chart behind the video: Off · Light · Strong |
| Advanced | Status, FFmpeg path, debug border, debug log window, language (English / 简体中文) |
Settings live in %APPDATA%\TaskmgrVideo\settings.json.
The video is painted by an external overlay window that is a direct port of
CS-LX/CPURacer's NativeExternalOverlay:
- a
WS_POPUPwindow withWS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_NOACTIVATE | WS_EX_TOOLWINDOW, DwmExtendFrameIntoClientArea(hwnd, -1, -1, -1, -1)so the client area is glass and per-pixel alpha shows,SetLayeredWindowAttributes(hwnd, 0, 255, LWA_ALPHA)instead of anUpdateLayeredWindowDIB blit,- a Direct2D
ID2D1HwndRenderTargetcleared to transparent every frame.
That is the configuration known to draw on the Windows 10 builds where every earlier backend (UpdateLayeredWindow DIB, chart child window, ...) produced nothing.
| Backend | How it draws | Notes |
|---|---|---|
| External overlay (default) | CPURacer's topmost layered window + DWM glass + Direct2D | The reference implementation |
| GDI layered (legacy) | Topmost layered window, UpdateLayeredWindow |
Kept only because it can export the composed frame as PNG |
Settings written by 1.x store a Backend the current build no longer honours; they are migrated to
the external overlay on load.
TaskmgrTracker ──chart rect──▶ LayoutMath ──decode size──▶ FfmpegDecoder
│ │ │
│ destination rect premultiplied BGRA
│ ▼ ▼
└──────────────────────▶ VideoOverlay ◀──── newest frame ┘
TaskmgrTrackerfindsTaskManagerWindow→ the largest visibleCvChartWindow, caches both handles and re-discovers only when one goes away. Per tick it costs four cheap queries.LayoutMathmaps the chart rectangle onto the video aspect ratio and caps the decode at ~1280×720 pixels; Direct2D scales the bitmap up, so a maximized window does not push a 4K frame through the pipe 30 times a second.FfmpegDecoderowns one FFmpeg process per session and a reader thread. Frames are converted to premultiplied BGRA with a 256-entry lookup table and published under a lock, so the renderer always gets the newest complete frame — slow renders drop frames instead of queueing them.- Resizing Task Manager rebuilds the pipeline only after the geometry stays stable for ~0.5 s, and resumes at the current play head.
.\build.cmd # Debug
.\build.cmd Release # Release
.\test.cmd # unit + FFmpeg decode tests
.\pack-release.cmd # all four zips in dist\ (set FFMPEG_DIR to include the bundled ones)Requires the .NET 8 SDK. The App project is net8.0-windows (WinForms + Direct2D via Vortice);
TaskmgrVideo.Logic is plain net8.0 so the decode pipeline, filter graph and layout math are
testable on any OS — the test suite runs a real FFmpeg decode when one is installed.
- The overlay follows whichever performance chart is visible (CPU, Memory, …), not only CPU.
- Hiding the window does not stop decoding; stop the playback from the tray to free the CPU.
- Task Manager running elevated does not block anything here (the overlay only reads geometry).
- Audio is ignored (
-an).
The overlay-on-Taskmgr idea and the layered/Direct2D window recipe come from CS-LX/CPURacer (a lunar-lander on the CPU graph) and svr2kos2/TaskmgrPlayer. This project keeps the window plumbing and replaces the game with an FFmpeg edge-video pipeline.
MIT licensed.

