Last active
July 19, 2018 04:26
-
-
Save sgnm/d3c677fd74f926f11970957ac86e15a1 to your computer and use it in GitHub Desktop.
change resolution to 1080p
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
#!/bin/bash | |
SCRIPT_NAME=`basename $0` | |
if [ $# -ne 2 ]; then | |
echo "usage: $SCRIPT_NAME input_path/ output_path/" | |
exit 1 | |
fi | |
INPUT_DIRECTORY_PATH=$1 | |
OUTPUT_DIRECTORY_PATH=$2 | |
for input_file_path in `\find $INPUT_DIRECTORY_PATH -type f \( -name "*.mp4" -o -name "*.MP4" -o -name "*.mov" -o -name "*.MOV" \)`; do | |
echo "====================" | |
echo "converting..." | |
echo "input file path: $input_file_path" | |
base_name=`basename $input_file_path` | |
output_file_path=$OUTPUT_DIRECTORY_PATH$base_name | |
ffmpeg -i $input_file_path -vf scale=1920:1080 $output_file_path -hide_banner | |
echo "output file path: $output_file_path" | |
echo "done!" | |
echo "====================" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment