Skip to content

Instantly share code, notes, and snippets.

@jaamo
Created July 1, 2016 18:58
Show Gist options
  • Save jaamo/98dec8ab13f57665d6257ef67ee9db27 to your computer and use it in GitHub Desktop.
Save jaamo/98dec8ab13f57665d6257ef67ee9db27 to your computer and use it in GitHub Desktop.
#
# Re-encode file
#
# -i input file
# -b:v video bitrate
# -c:v codec
# -r framerate
# -y overwrite output file
# -t limit time
# -s target size
# -an no audio
# Encode to VP9.
ffmpeg -i sample.mov -b:v 5000k -c:v libvpx-vp9 -r 30 -y -t 5 -s 1920x1280 -an sample-vp9-1280p-30fps-5000bps.webm
ffmpeg -i sample.mov -b:v 3000k -c:v libvpx-vp9 -r 30 -y -t 5 -s 1280x720 -an sample-vp9-720p-30fps-3000bps.webm
# Encode to H.264.
# ffmpeg -i 4k-sample.webm -b:v 5000k -c:v libx264 -r 30 -y -t 5 -s 1920x1280 -an sample-h264-1280p-30fps-5000bps.mp4
# ffmpeg -i 4k-sample.webm -b:v 3000k -c:v libx264 -r 30 -y -t 5 -s 1280x720 -an sample-h264-720p-30fps-3000bps.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment