From 86ec810e06e4f5fad11e10a787aad3f33d7fe9a1 Mon Sep 17 00:00:00 2001 From: Ken Swenson Date: Sat, 25 May 2019 05:37:35 -0400 Subject: [PATCH] Voice: add infinite retry arg to ytdl for rst packets (#578) Youtube periodically will send rst packets to drop the connection likely due to the slow download rate as it is piped directly into ffmpeg to play. The default number of retries is 10 which will abort playback in long tracks after 10 errors. This commit sets the max retries to infinite. --- src/voice/streamer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/voice/streamer.rs b/src/voice/streamer.rs index 368c6dfe6ca..72321b59150 100644 --- a/src/voice/streamer.rs +++ b/src/voice/streamer.rs @@ -277,6 +277,8 @@ pub fn ytdl(uri: &str) -> Result> { let ytdl_args = [ "-f", "webm[abr>0]/bestaudio/best", + "-R", + "infinite", "--no-playlist", "--ignore-config", uri,