ffplayout/docs/ingest_error.md
2023-02-06 12:30:36 +01:00

1.3 KiB

In some situations, application closure may occur in conjunction with Live Ingest.

Here is an example, in combination with SRS:

When a live stream is sent, it is forwarded to ffplayout, which then switches the TV program to the live stream.

Problems now occur if the internet connection for the live stream is not stable. Then timeouts can occur, SRS breaks the connection to the playout and the whole ffplayout process has to be restarted. The default timeout is 5000ms, i.e. 5 seconds.

The timeout can be heard in SRS in the respective vhosts with:

publish {
    normal_timeout 30000;
}

Here the new timeout would be 30 seconds.

The error behavior can be simulated under Linux using the tool tc. Then carry out the following steps:

  • Start SRS
  • start ffplayout, with rtmp target SRS
  • after a few seconds start a livestream to ffplayout
  • shortly afterwards start tc: tc qdisc add dev eth0 root netem loss 70%
  • wait until the timeout time is exceeded
  • ffplayout should close the process with encoder errors
  • undo tc rule: tc qdisc delete dev eth0 root

eth0 must be replaced with the physical network interface.

Reference: simulate-delayed-and-dropped-packets-on-linux