From 2e2135db50c9797e45199f73a9dc6e13145ff090 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 11 Jun 2024 21:55:54 +0100 Subject: [PATCH] Fix fuckwit again --- src/cogs/ffmeta.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cogs/ffmeta.py b/src/cogs/ffmeta.py index 2141c64..c0a71b7 100644 --- a/src/cogs/ffmeta.py +++ b/src/cogs/ffmeta.py @@ -210,9 +210,9 @@ class FFMeta(commands.Cog): "-sn", "-ac", str(channels), - "-y", "-f", - "mp4", + "opus", + "-y", "pipe:1", stdout=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)) paginator = commands.Paginator() - for line in stderr.decode().splitlines(): + for line in stderr.splitlines(): if line.strip().startswith(":"): continue paginator.add_line(f"{line}"[:2000]) @@ -260,13 +260,15 @@ class FFMeta(commands.Cog): "-i", str(rbh), "-c:v", - "libx264", - "-tune", - "stillimage", + "vp9", + "-c:a", + "libopus", "-pix_fmt", "yuv420p", "-shortest", "-y", + "-f", + "mkv", "pipe:1", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, @@ -278,7 +280,7 @@ class FFMeta(commands.Cog): if not fs: await ctx.respond("Failed to convert audio. See below.") 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() for line in stderr.decode().splitlines(): if line.strip().startswith(":"):