Skip to content

WhipInto ​

RTP/RTSP to WHIP tool

Streaming a camera from a Raspberry Pi / ARM board?

Do not pair whipinto with a software-encoding ffmpeg on these boards — the CPU cannot keep up. The native-rpi / native-rkmpp live777 builds capture and encode in hardware, in-process; see the Raspberry Pi deployment guide. whipinto is for sources that are already encoded (IP cameras, RTP/RTSP feeds, files, synthetic test sources).

This tool has two working modes:

  • rtp
  • rtsp as client

Use whepfrom for the reverse WHEP → RTP/RTSP direction, or follow the three-terminal loop.

Get it and prerequisites ​

Download a package or prebuilt binary using the installation guide, or build from this repository with cargo build --release --bin whipinto. You need a reachable Live777 WHIP endpoint and an already-encoded RTP/RTSP source. FFmpeg is required only for the examples below; synth:// input requires a build with --features=rsmpeg.

Bearer token ​

If live777.toml contains tokens = ["live777"] under [auth], pass the same token with -t:

bash
whipinto -i input.sdp -t live777 -w http://127.0.0.1:7777/whip/777

Do not put tokens in URLs or commit them to shell history and configuration files intended for publication.

Options ​

OptionDefaultDescription
-i, --inputinput.sdpInput source: SDP file path (RTP), rtsp:// (RTSP client mode), synth:// (generated test frames)
-w, --whiprequiredWHIP endpoint URL
-t, --tokennoneBearer token for WHIP authentication
--commandnoneRun a command as child process
--cable-urlnoneCable UDP bridge URL for DataChannel <-> UDP forwarding, e.g. udp://0.0.0.0:9001?host=127.0.0.1&port=9000
--cable-label-DataChannel label; joins the matching cable on the server
--ice-servernoneICE server for gathering, repeatable; format <url>[,<username>[,<credential>]]. Defaults to none — host candidates only (WHIP/WHEP endpoints advertise their own ICE servers via Link headers)
-vwarnIncrease verbosity (-v info, -vv debug, -vvv trace)

RTP ​

bash
whipinto -i input.sdp -w http://localhost:7777/whip/777

TIP

You need to generate an sdp file first

For example: Use ffmpeg -sdp_file flag

RTP Only video ​

bash
ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 \
-vcodec libx264 -pix_fmt yuv420p \
-g 60 -keyint_min 60 -crf 23 \
-preset ultrafast -tune zerolatency \
-profile:v main -level 4.1 \
-f rtp 'rtp://127.0.0.1:5002' -sdp_file input.sdp

RTP Only audio ​

bash
ffmpeg -re -f lavfi -i sine=frequency=1000 \
-acodec libopus \
-ar 48000 -ac 2 \
-b:a 48k -application voip \
-frame_duration 10 -vbr constrained \
-f rtp 'rtp://127.0.0.1:5004' -sdp_file input.sdp

RTP Audio and Video ​

bash
ffmpeg -re \
-f lavfi -i sine=frequency=1000 \
-f lavfi -i testsrc=size=1280x720:rate=30 \
-acodec libopus -vn -f rtp rtp://127.0.0.1:11111 \
-vcodec libvpx -an -f rtp rtp://127.0.0.1:11113 -sdp_file input.sdp

RTSP Client ​

whipinto as a client, pull stream from RTSP Server

bash
whipinto -i rtsp://127.0.0.1:8554 -w http://localhost:7777/whip/777

Use transport tcp ​

bash
whipinto -i rtsp://localhost:8554/test-rtsp?transport=tcp -w http://localhost:7777/whip/test-rtsp

Synthetic input ​

With the rsmpeg feature enabled, -i also accepts a synth:// URL that generates test frames in-process (no external encoder needed):

bash
whipinto -i 'synth://h264?audio=opus&width=1280&height=720&fps=30' \
  -w http://localhost:7777/whip/777

Format: synth://<vcodec>?<parameters>; <vcodec> is one of vp8, vp9, h264, h265, av1 and every parameter is optional:

ParameterDefaultDescription
audiononeAudio codec: opus, g722 (omit for no audio)
width640Video width in pixels
height480Video height in pixels
fps30Video frame rate
durationnoneStop publishing after this many seconds
ice--ice-server valueICE server spec <url>[,<username>[,<credential>]], repeatable; replaces the CLI list for this input (an empty value disables ICE servers)

About pkt_size=1200 ​

WARNING

WebRTC must need pkt_size<=1200

If pkt_size > 1200 (most tool default > 1200, for example: ffmpeg default 1472), we need to de-payload after re-payload

But now, We support re-size pkt_size in AV1, VP8 and VP9, You can use any pkt_size value in AV1, VP8 and VP9

CodecAV1VP9VP8H264H265OPUSG722
pkt_size > 1200⭐⭐⭐⭐⭐⭐💩
  • ⭐ It's working
  • 💩 Don't support

Troubleshooting ​

Run with -vv to include WebRTC and bridge diagnostics. Authentication, HTTP status codes and ICE failures are covered once in Troubleshooting; the rows below are specific to this tool.

SymptomWhat to check
404 Not FoundCheck the /whip/<stream> URL, server port and reverse-proxy path. Confirm you are publishing to Live777 rather than a WHEP endpoint.
Connected, but no mediaConfirm the sender is emitting to the SDP ports, the SDP codecs match the encoded input, and RTSP/SDP inputs are reachable. Check packet size and codec support above.

Released under the MPL-2.0 License.