【发布时间】:2021-08-11 20:03:36
【问题描述】:
我正在使用youtube-dl 将我的 Discord 机器人变成音乐播放器。通过让 ffmpeg 在此错误时重新连接,我通过了 common problem 的音乐被“拉功能错误”中断。但是,我无法弄清楚如何抑制发送到标准输出的错误消息:
[tls @ 0000023ea3564e80] Error in the pull function.
[https @ 0000023ea3560d80] Will reconnect at 327680 in 0 second(s), error=I/O error.
我的ytdl选项和ffmpeg选项如下:
YTDL_OPTIONS = \
{"format": "bestaudio",
"noplaylist": True,
"quiet": True}
FFMPEG_OPTIONS = \
{"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5",
"options": "-vn"}
我尝试了各种 YTDL 选项,例如 "no_warnings": False、"debug_printtraffic": False、"progress_hooks": [] 等。但是,这些添加都不起作用。老实说,我什至不知道这些消息的来源(youtube-dl 或 discord.py 本身)。有没有办法抑制这些消息?
【问题讨论】:
标签: python-3.x ffmpeg discord.py youtube-dl