Created
June 8, 2020 21:50
-
-
Save craftamap/42ffd69a9bd092630e74751aaed69bdf 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
#!/usr/bin/bash | |
# | |
# This script transcodes the input video into x265 30fps | |
# | |
INPUT=$1 | |
SEC=$2 | |
[[ -f "$INPUT" ]] || (echo "No input file specified" && exit 1) | |
[ -z "$SEC" ] && OUTPUT="${INPUT%.*}.mp4" || OUTPUT="$SEC" | |
echo "$INPUT -> $OUTPUT" | |
read -p "Are you sure? (y/N) " -r | |
[[ $REPLY =~ ^[Nn]$ ]] && exit | |
ffmpeg -i "$INPUT" -c:v libx265 -r 30 "$OUTPUT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment