From 7299eb8d3c2be5d79e24c6c7437888d6457a5bd6 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sat, 19 Jun 2021 12:33:06 +0200 Subject: [PATCH] update readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index b71e1fbd..403ba0cf 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Features: * [Fallback stream](#fallback-stream) * [Start on boot with systemd](#start-on-boot-with-systemd) * [Monitoring](#monitoring) + * [Corrupted frames](#corrupted-frames) * [Command-line usage](#command-line-usage) * [Compile and run from source](#compile-and-run-from-source) * [Links](#links) @@ -506,6 +507,37 @@ There are multiple ways to monitor the server usage over time: go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=30 ``` +### Corrupted frames + +In some scenarios, the server can send incomplete or corrupted frames. This can be caused by multiple reasons: + +* the packet buffer of the server is too small and can't handle the stream throughput. A solution consists in increasing its size: + + ```yml + readBufferCount: 1024 + ``` + +* The stream throughput is too big and the stream can't be sent correctly with the UDP stream protocol. UDP is more performant, faster and more efficient than TCP, but doesn't have a retransmission mechanism, that is needed in case of streams that need a large bandwidth. A solution consists in switching to TCP: + + ```yml + protocols: [tcp] + ``` + + In case the source is a camera: + + ```yml + paths: + test: + source: rtsp://.. + sourceProtocol: tcp + ``` + +* the software that is generating the stream (a camera or FFmpeg) is generating non-conformant RTP packets, with a payload bigger than the maximum allowed (that is 1460 due to the UDP MTU). A solution consists in increasing the buffer size: + + ```yml + readBufferSize: 8192 + ``` + ### Command-line usage ```