Created
January 18, 2017 22:29
-
-
Save stsimb/90766a6c22ff683e80c4c1df92da67e8 to your computer and use it in GitHub Desktop.
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 | |
| PARAM=$1 | |
| NEWNAME=${PARAM%.*}.mp4 | |
| # youtube params https://www.virag.si/2015/06/encoding-videos-for-youtube-with-ffmpeg/ | |
| ffmpeg -i "${PARAM}" -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac \ | |
| -strict -2 -b:a 384k -r:a 48000 -movflags faststart "${NEWNAME}" && \ | |
| touch -r "${PARAM}" "${NEWNAME}" && \ | |
| rm -f "${PARAM}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment