Created
September 16, 2015 17:04
-
-
Save deckerego/0aff3450896e630b04f3 to your computer and use it in GitHub Desktop.
Transcode a video to be HTML5 compliant
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
#!/bin/bash | |
FILE_PATH="$1" | |
FILE_DIR=$(dirname "$FILE_PATH") | |
FILE_NAME=$(basename "$FILE_PATH") | |
FILE_BASE="${FILE_NAME%.*}" | |
avconv -i "$FILE_PATH" -vcodec h264 -acodec aac -strict -2 "$FILE_DIR/$FILE_BASE.mp4" | |
rm -r -f "$FILE_PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment