Created
July 14, 2016 18:11
-
-
Save sl-digital/355bb5a907268aba55bca5321249ca74 to your computer and use it in GitHub Desktop.
FFMpeg Presets for HTML5 Videos
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/zsh | |
# USAGE: ./encoder.sh some-video.mov | |
# Changed the MP4 settings to work with Safari | |
# OGG seems to work best just using the quality scale | |
# WEBM is just adjusted by bitrate depending on how much motion there is | |
IN=$1 | |
OUT=$(echo $1 | sed 's/^\(.*\)\.[a-zA-Z0-9]*$/\1/') | |
ffmpeg -i $IN -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -movflags +faststart $OUT.mp4 | |
ffmpeg -i $IN -c:v libtheora -qscale:v 6 -movflags +faststart $OUT.ogv | |
ffmpeg -i $IN -c:v libvpx -b:v 2000k -movflags +faststart $OUT.webm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment