Fix fuckwit again
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 13s

This commit is contained in:
Nexus 2024-06-11 21:55:54 +01:00
parent 299145fa4b
commit 2e2135db50

View file

@ -210,9 +210,9 @@ class FFMeta(commands.Cog):
"-sn", "-sn",
"-ac", "-ac",
str(channels), str(channels),
"-y",
"-f", "-f",
"mp4", "opus",
"-y",
"pipe:1", "pipe:1",
stdout=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE,
@ -229,7 +229,7 @@ class FFMeta(commands.Cog):
return await ctx.respond(file=discord.File(file, filename=filename)) return await ctx.respond(file=discord.File(file, filename=filename))
paginator = commands.Paginator() paginator = commands.Paginator()
for line in stderr.decode().splitlines(): for line in stderr.splitlines():
if line.strip().startswith(":"): if line.strip().startswith(":"):
continue continue
paginator.add_line(f"{line}"[:2000]) paginator.add_line(f"{line}"[:2000])
@ -260,13 +260,15 @@ class FFMeta(commands.Cog):
"-i", "-i",
str(rbh), str(rbh),
"-c:v", "-c:v",
"libx264", "vp9",
"-tune", "-c:a",
"stillimage", "libopus",
"-pix_fmt", "-pix_fmt",
"yuv420p", "yuv420p",
"-shortest", "-shortest",
"-y", "-y",
"-f",
"mkv",
"pipe:1", "pipe:1",
stdout=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE,
@ -278,7 +280,7 @@ class FFMeta(commands.Cog):
if not fs: if not fs:
await ctx.respond("Failed to convert audio. See below.") await ctx.respond("Failed to convert audio. See below.")
else: else:
return await ctx.respond(file=discord.File(file, filename="right-behind-you.mp4")) return await ctx.respond(file=discord.File(file, filename="right-behind-you.webm"))
paginator = commands.Paginator() paginator = commands.Paginator()
for line in stderr.decode().splitlines(): for line in stderr.decode().splitlines():
if line.strip().startswith(":"): if line.strip().startswith(":"):