Deprecated: Use of "parent" in callables is deprecated in /var/www/html/forum/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php on line 431
  • If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Solved Youtube-dl not working properly

Neferites

Member
Hello,
I try to use youtube-dl to stream some music in my ts.
If I stream a 4 min video, everything works great.
But if I want to stream a 1-hour video, I can't.

The download is really slow :
2018-07-06 11_24_28-SinusBot.png
Logs are :

Bash:
2018/07/06 11:24:10 563e07f6 0456bfcf INFO   CHAT 2 [neferites @ Neferites] < !yt [URL]https://www.youtube.com/watch?v=Lo3rrP8u7Mw[/URL] > / OK
2018/07/06 11:24:10 563e07f6 0456bfcf INFO   PRIVATE-CHAT [SinusBot] Downloading [URL]https://www.youtube.com/watch?v=Lo3rrP8u7Mw[/URL]
2018/07/06 11:24:12 563e07f6          INFO   Downloading (multi) 114.1M with codec opus from youtube
2018/07/06 11:25:12 error: net/http: request canceled (Client.Timeout exceeded while reading body)

I read this post: https://forum.sinusbot.com/threads/not-a-bug-youtube-dl-slow-download-rate.4679/
Not working.

Everything is up-to-date :
Code:
11:29:16 with root in sinusbot/data/logs at teamspeak
➜ youtube-dl --update
youtube-dl is up-to-date (2018.07.04)

Sinusbot version :
0.13.37

My config.ini
Code:
11:32:47 with root in /nefzer/sinusbot at teamspeak took 27s
➜ cat config.ini
TS3Path = "/nefzer/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/nefzer/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = "/nefzer/sinusbot/data/logs/sinusbot.log"
LicenseKey = "6hhg0I6LLz3jc0ZGZajyN7Yrb1+zZSxYcQUi7Evf0h0="
IsProxied = false
DenyStreamURLs = []
Pragma = 0
YoutubeDLPath = "/nefzer/sinusbot/youtube-dl2"

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 1
  CacheStreamed = false
  TimeoutSingleDownloader = 0
  TimeoutMultiDownloader = 0
  ChunkSize = 5242880

[TS3]
  AvatarMaxWidth = 0
  AvatarMaxHeight = 0
  AllowGIF = false

[StreamRewrites]

[Scripts]
  AllowReload = false
  EnableTimer = false
  DisableLegacyEvents = false
  ScriptTimeout = 5

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (0.13.37-9791176)"

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

[SHMem]
  Enable = false
  Size = 0
  Delay = 0
  Interval = 0

[RadioStations]
  URL = ""
  UpdateInterval = 0

My youtube-dl2
Bash:
11:32:50 with root in /nefzer/sinusbot at teamspeak
➜ cat youtube-dl2
#!/bin/bash
/usr/local/bin/youtube-dl ${@/bestaudio/43}

If someone can help me, would be awesome.

Best regards
 

alsoGAMER

Member
I have this issue too

Code:
2018/07/15 18:30:06 64457acb          INFO   Downloading (multi) 56.2M with codec opus from youtube
2018/07/15 18:31:06 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/15 18:31:07 64457acb          INFO   DOWNLOAD [admin] https://www.youtube.com/watch?v=ID OK
 
Last edited:

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Solution:
Add / modify the following in your config.ini, that should help:
Code:
[YoutubeDL]
ChunkSize = 2000000
MaxSimultaneousChunkDownloads = 8
 

alsoGAMER

Member
Still not fixed, here what console reports:

Code:
2018/07/30 17:54:49 c5cd5006          INFO   JOBS-ADD [admin] https://www.youtube.com/watch?v=EaSn2infXR4 OK
2018/07/30 17:55:08 c5cd5006          INFO   Downloading (multi) 60.9M with codec opus from youtube
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:08 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 17:56:10 c5cd5006          INFO   DOWNLOAD [admin] https://www.youtube.com/watch?v=EaSn2infXR4 OK

config.ini:

Code:
[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 8
  CacheStreamed = false
  TimeoutSingleDownloader = 0
  TimeoutMultiDownloader = 0
  ChunkSize = 2000000
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Still not fixed, here what console reports:
Your server is too slow (it needs more than 60 seconds for 60MB as you can see) or the servers are throtteling too much.

Try setting
TimeoutMultiDownloader = 500
to give it more time

or

ChunkSize = 1000000
MaxSimultaneousChunkDownloads = 16

to speed things up if possible.
 

alsoGAMER

Member
Your server is too slow (it needs more than 60 seconds for 60MB as you can see) or the servers are throtteling too much.

Try setting
TimeoutMultiDownloader = 500
to give it more time

or

ChunkSize = 1000000
MaxSimultaneousChunkDownloads = 16

to speed things up if possible.
Ok lets trying on my fatest server
 

alsoGAMER

Member
Code:
2018/07/30 18:09:24 4a3a60e9          INFO   JOBS-ADD [ag] https://www.youtube.com/watch?v=2ZC3rM2Y8jQ OK
2018/07/30 18:09:28 4a3a60e9          INFO   Downloading (multi) 236.4M with codec opus from youtube
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:28 error: net/http: request canceled (Client.Timeout exceeded while reading body)
2018/07/30 18:10:32 4a3a60e9          INFO   DOWNLOAD [ag] https://www.youtube.com/watch?v=2ZC3rM2Y8jQ OK

I guess I have to increase 1 of the values mentioned above.. but how much?
 
Top