Skip to content

WhipSynth

whipsynth is a synthetic WHIP publisher. It generates audio and video test patterns locally with FFmpeg via the rsmpeg crate and publishes them to a WHIP endpoint without any external media source.

Use cases

  • Quickly verify that a WHIP endpoint accepts and forwards streams.
  • Load-test a Live777 instance with many concurrent publishers.
  • Reproduce codec-specific issues without setting up a real camera or FFmpeg pipeline.

Build

bash
# Build the whipsynth binary (requires FFmpeg development libraries)
cargo build --bin whipsynth --features rsmpeg

Usage

Publish a 640x480 VP8 video-only stream to a WHIP endpoint:

bash
whipsynth -w http://localhost:7777/whip/live

Publish VP8 video + Opus audio:

bash
whipsynth -w http://localhost:7777/whip/live --acodec opus

Publish H.264 with authentication token and run for 60 seconds:

bash
whipsynth -w http://localhost:7777/whip/live \
          -t my-token \
          --vcodec h264 \
          --duration 60

Options

OptionDefaultDescription
-w, --whiprequiredWHIP endpoint URL
-t, --tokennoneBearer token for WHIP authentication
--vcodecvp8Video codec: vp8, vp9, h264, h265, av1
--acodecnoneAudio codec: opus, g722 (omit for no audio)
--width640Video width in pixels
--height480Video height in pixels
--fps30Video frame rate
--durationnoneRun for the specified number of seconds, then exit

Load-test mode

whipsynth can spawn multiple concurrent publishers. These options are hidden from the default help because they are mainly used by the test suite:

bash
whipsynth -w http://localhost:7777/whip/live --count 10 --spawn-interval-ms 200

Each session gets a unique URL by appending an index to the last path segment. For example, with --count 3 and base URL /whip/live, the sessions publish to /whip/live-0, /whip/live-1, and /whip/live-2.

OptionDefaultDescription
--count1Number of concurrent WHIP sessions
--spawn-interval-ms100Delay between spawning each session

Exit code

  • 0: publishing finished normally (duration elapsed or cancelled).
  • 1: an error occurred, for example the WHIP endpoint rejected the request or the peer connection failed.

Released under the MPL-2.0 License.