Created
October 24, 2014 11:44
-
-
Save thisislawatts/8a1356b7528a5556eb7c to your computer and use it in GitHub Desktop.
Convert your gif to an mp4
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
function giftomp4() { | |
file_path=$(pwd) | |
file_name=$(basename "${1}") | |
file_ext="${file_name##*.}" | |
file_name="${file_name%.*}" | |
frame_rate=3 | |
if [ "$2" ] | |
then | |
frame_rate=${2} | |
fi | |
echo "$file_name.$file_ext" | |
ffmpeg -f gif -r $frame_rate -i $file_name.$file_ext -vcodec libx264 -pix_fmt yuv420p $file_name.mp4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment