mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 14:43:08 +02:00
feat: add flags to video conversion
This commit is contained in:
parent
166f1d35a9
commit
037ca27fd2
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user