Last active
July 8, 2021 14:39
-
-
Save tangert/65c16cd320a13ab45e1870bb0ffcc8b5 to your computer and use it in GitHub Desktop.
Just makes videos smol. sensible defaults for ffmpeg
This file contains 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
# USAGE: | |
# smolvid yourmovie.mov | |
# INSTALL: | |
# add this to your .bashrc or .zshrc or wherever: | |
# alias smolvid="bash path/to/smolvid.sh "$1"" | |
# SCRIPT: | |
# input file | |
INPUT="$1" | |
# auto create a new output file name | |
FILE_NAME=$(echo "$INPUT" | cut -f 1 -d '.') | |
EXTENSION=$(echo "$INPUT" | cut -f 2 -d '.') | |
OUTPUT="${FILE_NAME}-new.${EXTENSION}" | |
# run it through ffmpeg | |
ffmpeg -i "$INPUT" -vcodec libx264 -c:a copy -crf 30 "$OUTPUT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment