2017-09-06 20:57:07 +00:00
|
|
|
UDP file options
|
|
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-03-07 01:40:50 +00:00
|
|
|
UDP file is of the form::
|
|
|
|
|
2018-05-02 17:55:51 +00:00
|
|
|
udp://<ip>:<port>[?<option>[&<option>]...]
|
2018-03-07 01:40:50 +00:00
|
|
|
|
|
|
|
Here is the list of supported options:
|
2017-09-06 20:57:07 +00:00
|
|
|
|
2018-06-07 18:20:12 +00:00
|
|
|
:buffer_size=<size_in_bytes>:
|
2017-09-06 20:57:07 +00:00
|
|
|
|
2018-06-07 18:20:12 +00:00
|
|
|
UDP maximum receive buffer size in bytes. Note that although it can be set
|
|
|
|
to any value, the actual value is capped by maximum allowed size defined by
|
|
|
|
the underlying operating system. On linux, the maximum size allowed can be
|
|
|
|
retrieved using `sysctl net.core.rmem_max` and configured using
|
|
|
|
`sysctl -w net.core.rmem_max=<size_in_bytes>`.
|
2017-09-06 20:57:07 +00:00
|
|
|
|
2018-05-02 17:55:51 +00:00
|
|
|
:interface=<addr>:
|
2017-09-06 20:57:07 +00:00
|
|
|
|
2018-03-06 18:09:28 +00:00
|
|
|
Multicast group interface address. Only the packets sent to this address are
|
2017-12-02 00:09:40 +00:00
|
|
|
received. Default to "0.0.0.0" if not specified.
|
2017-09-06 20:57:07 +00:00
|
|
|
|
2018-06-07 18:20:12 +00:00
|
|
|
:reuse=0|1:
|
|
|
|
|
|
|
|
Allow or disallow reusing UDP sockets.
|
|
|
|
|
2018-05-02 17:55:51 +00:00
|
|
|
:source=<addr>:
|
2018-03-06 18:09:28 +00:00
|
|
|
|
|
|
|
Multicast source ip address. Only the packets sent from this source address
|
2018-03-07 01:40:50 +00:00
|
|
|
are received. Enables Source Specific Multicast (SSM) if set.
|
2018-03-06 18:09:28 +00:00
|
|
|
|
2018-05-02 17:55:51 +00:00
|
|
|
:timeout=<microseconds>:
|
2017-09-06 20:57:07 +00:00
|
|
|
|
|
|
|
UDP timeout in microseconds.
|
2018-03-07 01:40:50 +00:00
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
udp://224.1.2.30:88?interface=10.11.12.13&reuse=1
|
2018-06-07 18:20:12 +00:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
UDP is by definition unreliable. There could be packets dropped.
|
|
|
|
|
|
|
|
UDP packets do not get lost magically. There are things you can do to
|
|
|
|
minimize the packet loss. A common cause of packet loss is buffer overrun,
|
|
|
|
either in send buffer or receive buffer.
|
|
|
|
|
|
|
|
On Linux, you can check UDP errors by monitoring the output from
|
|
|
|
`netstat -suna` command.
|
|
|
|
|
|
|
|
If there is an increase in `send buffer errors` from the `netstat` output,
|
|
|
|
then try increasing `buffer_size` in
|
|
|
|
[FFmpeg](https://ffmpeg.org/ffmpeg-protocols.html#udp).
|
|
|
|
|
|
|
|
If there is an increase in `receive buffer errors`, then try increasing
|
|
|
|
`buffer_size` in UDP options (See above) or increasing `--io_cache_size`.
|
|
|
|
`buffer_size` in UDP options defines the UDP buffer size of the underlying
|
|
|
|
system while `io_cache_size` defines the size of the internal circular
|
|
|
|
buffer managed by `Shaka Packager`.
|