Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Scale MP4 video to 320px using ffmpeg
# Video Scaler
# Place the MP4 files in the same script directory.
# Finished (done) files will placed in $FINISHED_DIR directory.
# New resized files will placed in $OUTPUT_DIR directory.
mkdir -p $OUTPUT_DIR
mkdir -p $FINISHED_DIR
echo "Scaling..."
find -maxdepth 1 -name "*.mp4" -exec ffmpeg -i {} -vf scale=$SCALE:-1 $OUTPUT_DIR/{}-$SCALE.mp4 \; -exec mv {} $FINISHED_DIR \;
echo "done!"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.