diff options
| author | SamlonDev <stankiewiczgracjan2019@gmail.com> | 2025-09-02 23:15:00 +0200 |
|---|---|---|
| committer | SamlonDev <stankiewiczgracjan2019@gmail.com> | 2025-09-02 23:15:00 +0200 |
| commit | c6b9ec44dcf72bfad8a11166e01e32e59d94e383 (patch) | |
| tree | 46d1c9af595e59f3ca403e461c4a435583466795 /cogs/compression.py | |
| parent | add context commands (diff) | |
| download | senator-sperma-c6b9ec44dcf72bfad8a11166e01e32e59d94e383.tar.gz senator-sperma-c6b9ec44dcf72bfad8a11166e01e32e59d94e383.zip | |
scalable video compression
Diffstat (limited to 'cogs/compression.py')
| -rw-r--r-- | cogs/compression.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cogs/compression.py b/cogs/compression.py index db47d46..f39b56a 100644 --- a/cogs/compression.py +++ b/cogs/compression.py | |||
| @@ -61,7 +61,7 @@ class Compression(commands.Cog): | |||
| 61 | logger.info(f"Compression started for: {file_type}") | 61 | logger.info(f"Compression started for: {file_type}") |
| 62 | if file_type == "Video": | 62 | if file_type == "Video": |
| 63 | # Execute ffmpeg command to compress video | 63 | # Execute ffmpeg command to compress video |
| 64 | ffmpeg_command = f"ffmpeg -i {input_path} -c:v libx264 -crf 51 -b:v 100 -vf 'fps=10' -preset ultrafast -c:a libopus -b:a 500 {output_path}" | 64 | ffmpeg_command = f"ffmpeg -i {input_path} -c:v libx264 -crf 51 -b:v 100 -vf 'fps=10,scale=trunc(iw*0.5/2)*2:trunc(ih*0.5/2)*2' -preset ultrafast -c:a libopus -b:a 500 {output_path}" |
| 65 | elif file_type == "Audio": | 65 | elif file_type == "Audio": |
| 66 | ffmpeg_command = f"ffmpeg -i {input_path} -ac 1 -b:a 500 -acodec libopus {output_path}" | 66 | ffmpeg_command = f"ffmpeg -i {input_path} -ac 1 -b:a 500 -acodec libopus {output_path}" |
| 67 | elif file_type == "Image": | 67 | elif file_type == "Image": |
