Created
November 29, 2019 09:25
-
-
Save cocoabox/a8318be3246a9b5241c7ade18f9057d0 to your computer and use it in GitHub Desktop.
to-mp4-baseline.sh
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
| # .bashrc | |
| # ======= | |
| to-mp4-baseline () | |
| { | |
| if [ -z "$2" ]; then | |
| OUT="$1.mp4"; | |
| else | |
| OUT="$2"; | |
| fi; | |
| if [ -f "$OUT" ]; then | |
| echo "output file already exists : $OUT" > /dev/stderr; | |
| exit 1; | |
| fi; | |
| ffmpeg -i "$1" -c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a aac -ac 2 -b:a 128k -vsync 0 -movflags faststart "$OUT"; | |
| return $? | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment