Skip to content

Commit a4c0f1f

Browse files
committed
doc: add doc for dtls and whip
Signed-off-by: Jack Lau <[email protected]>
1 parent eeb11a5 commit a4c0f1f

File tree

2 files changed

+103
-4
lines changed

2 files changed

+103
-4
lines changed

doc/muxers.texi

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,16 +3915,37 @@ Default value is 5000.
39153915

39163916
@item pkt_size @var{integer}
39173917
Set the maximum size, in bytes, of RTP packets that send out.
3918-
Default value is 1500.
3918+
Default value is 1200.
39193919

39203920
@item authorization @var{string}
3921-
The optional Bearer token for WHIP Authorization.
3921+
Optional Bearer token for WHIP Authorization.
39223922

39233923
@item cert_file @var{string}
3924-
The optional certificate file path for DTLS.
3924+
Optional certificate file path for DTLS.
39253925

39263926
@item key_file @var{string}
3927-
The optional private key file path for DTLS.
3927+
Optional private key file path for DTLS.
3928+
3929+
@item whip_flags @var{flags}
3930+
Possible values:
3931+
3932+
@table @samp
3933+
@item ignore_ipv6
3934+
Ignore any IPv6 ICE candidates.
3935+
3936+
@item disable_rtx
3937+
Disable RFC 4588 RTX (Retransmission) support.
3938+
This disables the retransmission mechanism for lost RTP packets.
3939+
3940+
@item dtls_active
3941+
Set DTLS role as active (client role) instead of passive (server role).
3942+
By default, WHIP uses passive DTLS role, but some servers may require active role.
3943+
@end table
3944+
3945+
@item rtx_history_size @var{integer}
3946+
Set the packet history size for RTX (retransmission) support.
3947+
This determines how many recent RTP packets are kept in memory for potential
3948+
retransmission requests. Range is 64 to 2048, default is 256.
39283949

39293950
@end table
39303951

doc/protocols.texi

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,84 @@ To play back a stream from the TLS/SSL server using @command{ffplay}:
20282028
ffplay tls://@var{hostname}:@var{port}
20292029
@end example
20302030

2031+
@section dtls
2032+
2033+
Datagram Transport Layer Security (DTLS)
2034+
2035+
The required syntax for a DTLS URL is:
2036+
@example
2037+
dtls://@var{hostname}:@var{port}
2038+
@end example
2039+
2040+
DTLS shares most options with TLS, but operates over UDP instead of TCP.
2041+
The following parameters can be set via command line options
2042+
(or in code via @code{AVOption}s):
2043+
2044+
@table @option
2045+
2046+
@item ca_file, cafile=@var{filename}
2047+
A file containing certificate authority (CA) root certificates to treat
2048+
as trusted. If the linked TLS library contains a default this might not
2049+
need to be specified for verification to work, but not all libraries and
2050+
setups have defaults built in.
2051+
The file must be in OpenSSL PEM format.
2052+
2053+
@item tls_verify=@var{1|0}
2054+
If enabled, try to verify the peer that we are communicating with.
2055+
Note, if using OpenSSL, this currently only makes sure that the
2056+
peer certificate is signed by one of the root certificates in the CA
2057+
database, but it does not validate that the certificate actually
2058+
matches the host name we are trying to connect to.
2059+
2060+
This is disabled by default since it requires a CA database to be
2061+
provided by the caller in many cases.
2062+
2063+
@item cert_file, cert=@var{filename}
2064+
A file containing a certificate to use in the handshake with the peer.
2065+
(When operating as server, in listen mode, this is more often required
2066+
by the peer, while client certificates only are mandated in certain
2067+
setups.)
2068+
2069+
@item key_file, key=@var{filename}
2070+
A file containing the private key for the certificate.
2071+
2072+
@item cert_pem=@var{string}
2073+
A PEM-encoded certificate string to use in the handshake with the peer.
2074+
2075+
@item key_pem=@var{string}
2076+
A PEM-encoded private key string for the certificate.
2077+
2078+
@item listen=@var{1|0}
2079+
If enabled, listen for connections on the provided port, and assume
2080+
the server role in the handshake instead of the client role.
2081+
2082+
@item mtu=@var{size}
2083+
Set the Maximum Transmission Unit (MTU) for DTLS packets.
2084+
2085+
@item use_srtp=@var{1|0}
2086+
Enable the use_srtp DTLS extension.
2087+
This is used in WebRTC applications to establish SRTP encryption keys
2088+
through the DTLS handshake. Default is disabled.
2089+
2090+
@item external_sock=@var{1|0}
2091+
Use an external socket instead of creating a new one. Default is disabled.
2092+
2093+
@end table
2094+
2095+
Example command lines:
2096+
2097+
To create a DTLS server:
2098+
2099+
@example
2100+
ffmpeg -listen 1 -i dtls://@var{hostname}:@var{port} @var{output}
2101+
@end example
2102+
2103+
To create a DTLS server and send data to server:
2104+
2105+
@example
2106+
ffmpeg -i @var{input} -f @var{format} dtls://@var{hostname}:@var{port}
2107+
@end example
2108+
20312109
@section udp
20322110

20332111
User Datagram Protocol.

0 commit comments

Comments
 (0)