Created
April 26, 2024 04:22
-
-
Save miladfa7/31aa5d617823c5596069247bbd440bba to your computer and use it in GitHub Desktop.
Reduce video size with ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file="/mnt/disk2/users/milad/videos/final_match.mp4" | |
output_dir="/mnt/disk2/users/milad/output" | |
input_file="$file" | |
filename=$(basename -- "$input_file") | |
filename_noext="${filename%.*}" | |
output_file="$output_dir/${filename_noext}.mp4" | |
# Reduce video size using ffmpeg | |
ffmpeg -i "$input_file" -vf "scale=640:480" -c:a copy "$output_file" | |
echo "Compression complete. Output file: $output_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment