From 037ca27fd2ad3996e7147d892df66f5eb14ab0b8 Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Thu, 5 Dec 2024 19:36:29 +0100 Subject: [PATCH] feat: add flags to video conversion --- convert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.sh b/convert.sh index c1123e7..7c19dfd 100755 --- a/convert.sh +++ b/convert.sh @@ -39,7 +39,7 @@ convert_video() { TARGET_BITRATE=$(echo "($TARGET_SIZE_BYTES * 8) / $DURATION / 2000" | bc) # Reduce by 10% to ensure size is below target # Convert video - ffmpeg -i "$input_file" -b:v "${TARGET_BITRATE}k" -c:a copy "$output_file" + ffmpeg -i "$input_file" -vcodec libx264 -b:v "${TARGET_BITRATE}k" -preset veryslow -acodec aac -c:a copy "$output_file" # Get original and converted video sizes ORIGINAL_SIZE=$(stat -c%s "$input_file")