@@ -180,6 +180,50 @@ Camera --[RTP stream (UDP)]--> wfb_ng --//--[ RADIO ]--//--> wfb_ng --[RTP strea
180180 ! rtph264depay ! avdec_h264 ! clockoverlay valignment=bottom ! autovideosink fps-update-interval=1000 sync=false
181181 ```
182182
183+ ## Multi-stream wfb_tx (fork feature: per-stream FEC profiles in one process)
184+
185+ One ` wfb_tx ` can serve several streams, each with its own radio_port, FEC profile,
186+ session key and radiotap header — designed for unequal error protection of layered
187+ video (SVC-T from [ OpenIPC waybeam_venc] ( https://github.com/OpenIPC/waybeam_venc ) ):
188+ the always-decodable base layer rides strong FEC, the droppable enhancement layer
189+ rides light FEC, and one process replaces N.
190+
191+ ```
192+ wfb_tx -K drone.key -i 7669206 -C 7003 \
193+ -y "u=5600,p=0,k=8,n=12,T=15" \ # base video (priority 0 = drained first)
194+ -y "u=5605,p=1,k=8,n=9,T=15" \ # enhance video (sheds load first when saturated)
195+ wlan0
196+ ```
197+
198+ Stream spec keys: ` u=<udp_port> ` or ` shm=<waybeam venc_ring name> ` (input, exactly one),
199+ ` p=<radio_port> ` (required, unique), ` k ` /` n ` /` T ` /` F ` (FEC), ` mcs ` /` bw ` /` gi ` /` stbc ` /` ldpc ` /` vht ` /` nss `
200+ (per-stream radiotap). Unset keys inherit the global options. Spec order is strict drain
201+ priority: ready inputs are serviced first-spec-first and drained fully, so under radio
202+ saturation the kernel socket buffers of later streams overflow first — by design. Note
203+ that a continuously saturating higher-priority stream can starve lower ones; order
204+ streams by importance (base > audio > enhance > telemetry).
205+
206+ ` shm=<name> ` attaches to a waybeam_venc shared-memory packet ring (` /dev/shm/<name> ` ,
207+ one complete RTP packet per slot — set waybeam's ` outgoing.server ` to ` shm://<name> `
208+ and ` outgoing.enhancePort ` to get a second ` <name>_enh ` ring). The reader survives
209+ producer respawns (epoch-based re-attach). With debug mode (` -D port ` ), stream * i*
210+ emulates its wlans on ports ` port + i*num_wlans + wlan_idx ` .
211+
212+ Runtime per-stream control (e.g. closed-loop FEC adaptation of the enhancement layer):
213+
214+ ```
215+ wfb_tx_cmd 7003 get_fec_stream -r 1
216+ wfb_tx_cmd 7003 set_fec_stream -r 1 -k 8 -n 10
217+ wfb_tx_cmd 7003 set_radio_stream -r 1 -M 2
218+ ```
219+
220+ On the ground side run one ` wfb_rx ` per stream as usual (` -p 0 ` , ` -p 1 ` , ...). For
221+ SVC-T both decoded outputs can feed the same decoder port — the streams share one
222+ RTP sequence space (see waybeam_venc ` outgoing.enhancePort ` ). Stats: multi-stream
223+ mode emits per-stream ` PKT_S ` /` TX_ANT_S ` stdout lines tagged with the radio_port in
224+ addition to the legacy aggregate ` PKT ` /` TX_ANT ` lines, which existing parsers keep
225+ understanding unchanged. Without any ` -y ` option wfb_tx behaves exactly as upstream.
226+
183227## HOWTO build:
184228
185229For development (inline build)
0 commit comments