【发布时间】:2021-06-30 08:17:38
【问题描述】:
我正在制作一个具有 rickrolling 功能的机器人。涉及到ffmpeg,但是总是报如下错误:
FFmpeg version SVN-r18639, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-postproc --enable-gpl --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --enable-avisynth --enable-pthreads
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 21 2009 13:44:38, gcc: 4.2.4 (TDM-1 for MinGW)
Input #0, mp3, from 'rick.mp3':
Duration: 00:03:33.10, start: 0.000000, bitrate: 192 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
Expected number for loglevel but found: warning
即使我切换到不同的文件,它仍然会出现此错误,我做错了什么吗?我在 Windows python 3.8.2,discord.py 1.6.0 上。这是代码部分:
@bot.command(name="rickroll")
async def rick(ctx, channel: discord.VoiceChannel):
connection = await channel.connect()
connection.play(discord.FFmpegPCMAudio("rick.mp3", executable="ffmpeg.exe"))
【问题讨论】:
标签: python ffmpeg discord.py