Phosphene: Open-source video wallpaper engine built on Apple's private framework
Phosphene is a macOS Tahoe menu bar app that lets users set arbitrary video files as desktop and lock-screen wallpapers, slotting them into the native System Settings wallpaper picker alongside Apple’s Aerials. It achieves this by reverse-engineering WallpaperExtensionKit, the private framework Apple uses internally, loading it via dlopen and using Mirror-based reflection to parse undocumented XPC request types. That out-of-process design means playback survives app quits and hooks into the OS lock-screen, idle, and sleep lifecycle.
The technical work goes beyond playback. A PlaybackPolicy state machine collapses thermal load, battery state, presentation mode, and window occlusion into a single tier that the renderer honors at each loop boundary, optionally swapping to pre-transcoded lower-resolution variants. Gapless looping required ditching AVPlayerLayer (which fails inside a remote CAContext) for a hand-driven AVSampleBufferDisplayLayer pipeline with monotonically increasing PTS offsets, and a runtime swizzle works around a snapshot encoder that checks for an exact NSXPCCoder type the system doesn’t actually pass in.
The project is fragile by design: any macOS point release could rename fields or change XPC contracts and break it. The author released it as MIT after concluding the commercial market for video wallpaper apps was already saturated — making the reverse-engineering notes themselves the more durable contribution.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.