A Local RTMP Server for Testing Audio Hijack Streams

Testing an Audio Hijack streaming setup against a real RTMP destination means either paying for one or trusting your stream key to somewhere you don’t control. Neither is great for iteration, so servers/rtmp is a small node-media-server-based ingest that runs entirely on your own machine: RTMP in on :1935, HTTP-FLV and HLS out, a JSON status API on :8000 so you can see what’s actually connected without guessing.

Verified end to end with an ffmpeg publish into it, which is the only test that matters for something like this, either a real stream shows up as a real stream or the whole exercise is theater.

The RTMP server's /api/streams JSON status endpoint, showing a real ffmpeg test publish with actual H264/AAC codec details, not a mock

It didn’t stay that simple for long, though (nothing does, folks). node-media-server 2.7.0’s HLS transcoder throws 'version is not defined' the moment you try to run it, a bug in the library itself, not anything in the config wired up here. RTMP ingest and HTTP-FLV playback don’t touch that code path at all, and they’re enough to confirm a stream is real, codecs and all, so the fix was just to not ask for HLS: dropped the trans config block and its ffmpeg dependency entirely. Verified again after: continuous H.264+AAC publish accepted, /api/streams reports the right codecs, FLV playback returns 200. Smaller server, one less broken feature, same actual test coverage.