@@ -2028,6 +2028,84 @@ To play back a stream from the TLS/SSL server using @command{ffplay}:
2028
2028
ffplay tls://@var {hostname }:@var {port }
2029
2029
@end example
2030
2030
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
+
2031
2109
@section udp
2032
2110
2033
2111
User Datagram Protocol.
0 commit comments