@@ -1333,6 +1333,56 @@ Set custom HTTP headers, can override built in default headers. Applicable only
1333
1333
1334
1334
@end table
1335
1335
1336
+ @anchor {rtc }
1337
+ @section rtc
1338
+
1339
+ WebRTC (Real-Time Communication) muxer that supports sub-second latency streaming according to
1340
+ the WHIP (WebRTC-HTTP ingestion protocol) specification.
1341
+
1342
+ It uses HTTP as a signaling protocol to exchange SDP capabilities and ICE lite candidates. Then,
1343
+ it uses STUN binding requests and responses to establish a session over UDP. Subsequently, it
1344
+ initiates a DTLS handshake to exchange the SRTP encryption keys. Lastly, it splits video and
1345
+ audio frames into RTP packets and encrypts them using SRTP.
1346
+
1347
+ Ensure that you use H.264 without B frames and Opus for the audio codec. For example, to convert
1348
+ an input file with @command {ffmpeg } to WebRTC:
1349
+ @example
1350
+ ffmpeg -re -i input.mp4 -acodec libopus -ar 48000 -ac 2 \
1351
+ -vcodec libx264 -profile:v baseline -tune zerolatency -threads 1 -bf 0 \
1352
+ -f rtc "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream"
1353
+ @end example
1354
+
1355
+ For this example, we have employed low latency options, resulting in an end-to-end latency of
1356
+ approximately 150ms.
1357
+
1358
+ @subsection Options
1359
+
1360
+ This muxer supports the following options:
1361
+
1362
+ @table @option
1363
+
1364
+ @item ice_arq_max @var {size }
1365
+ Set the maximum number of retransmissions for the ICE ARQ mechanism.
1366
+ Default value is 5.
1367
+
1368
+ @item ice_arq_timeout @var {size }
1369
+ Set the start timeout in milliseconds for the ICE ARQ mechanism.
1370
+ Default value is 30.
1371
+
1372
+ @item dtls_arq_max @var {size }
1373
+ Set the maximum number of retransmissions for the DTLS ARQ mechanism.
1374
+ Default value is 5.
1375
+
1376
+ @item dtls_arq_timeout @var {size }
1377
+ Set the start timeout in milliseconds for the DTLS ARQ mechanism.
1378
+ Default value is 50.
1379
+
1380
+ @item pkt_size @var {size }
1381
+ Set the maximum size, in bytes, of RTP packets that send out.
1382
+ Default value is 1500.
1383
+
1384
+ @end table
1385
+
1336
1386
@anchor {ico }
1337
1387
@section ico
1338
1388
0 commit comments