Created
November 19, 2021 16:19
-
-
Save ryanmr/c0a21c7276007489afa1dd25648d0618 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# A sample Bash script, by Ryan | |
DT=$(date '+%Y-%m-%d-%H%M%S') | |
OUTPUT_NAME="converted-$DT.mp4" | |
OUTPUT_FOLDER=$(dirname "$1") | |
OUTPUT_PATH="$OUTPUT_FOLDER/$OUTPUT_NAME" | |
echo "converting input video $1 to $OUTPUT_NAME mp4" | |
ffmpeg -i "$1" -vcodec libx264 -crf 23 -acodec mp2 "$OUTPUT_PATH" | |
echo "all done 😸" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment