Tools & UtilitiesOpen source
PowerShell CLI Audio Streamer
A headless, CLI-based PowerShell wrapper for the `mpv` media engine, providing resource-efficient streaming of internet radio endpoints with zero GUI overhead.
Tech stack
- Languages
- Frameworks & libraries
- Tools
Performance & metrics
- Reduces memory footprint from typical web-player levels (~300MB) to the absolute bare minimum required by the
mpvdaemon and a dormant PS session - Eliminates graphics rendering overhead entirely by bypassing the Windows DWM (Desktop Window Manager) and enforcing hardware-level audio decoding
Why I built it
Modern browsers and Electron-based music players consume unjustifiable amounts of RAM and CPU cycles for simple audio streaming tasks. I engineered this utility to entirely bypass GUI bloat, directly piping audio streams through the highly optimized mpv daemon. It functions as a background audio process with a near-zero system footprint, ideal for constrained development environments.Architecture & decisions
Structured as a synchronous REPL loop operating within the PowerShell host. Station metadata and stream endpoints are strictly defined in an in-memory array of hashtables. Subprocess routing is delegated to the mpv engine via the call operator (&), explicitly forcing audio-only execution (--no-video) to eliminate GPU rendering hooks. Graceful process teardown is achieved by catching PipelineStoppedException signals when the user interrupts the execution via SIGINT (Ctrl+C).
Key features
- 01Headless audio streaming via direct subprocess delegation to the
mpvengine - 02Strict type validation utilizing
[int]::TryParseto prevent memory access violations during menu index selection - 03Robust exception handling for
SIGINTinterruptions, ensuring clean subprocess termination without zombie processes