Skip to content

Instantly share code, notes, and snippets.

@jmcbee
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmcbee/526aef1f61752c4b6f0f to your computer and use it in GitHub Desktop.
Save jmcbee/526aef1f61752c4b6f0f to your computer and use it in GitHub Desktop.
#!/bin/bash
video=bbb_sunflower_2160p_60fps_normal.mp4
ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 180k -maxrate 180k -vf scale="trunc(oh*a/2)*2:240" -crf 23 -c:a libvorbis -b:a 128k 240p.mp4
ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 300k -maxrate 300k -vf scale="trunc(oh*a/2)*2:360" -crf 23 -c:a libvorbis -b:a 192k 360p.mp4
ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 500k --maxrate 500k vf scale="trunc(oh*a/2)*2:480" -crf 23 -c:a libvorbis -b:a 256k 480p.mp4
ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 1000k -maxrate 1000k -vf scale="trunc(oh*a/2)*2:720" -crf 23 -c:a libvorbis -b:a 256k 720p.mp4
ffmpeg -i "$video" -t 60 -c:v libx264 -profile:v baseline -preset veryfast -b:v 2000k -maxrate 2000k -vf scale="trunc(oh*a/2)*2:1080" -crf 23 -c:a libvorbis -b:a 256k 1080p.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment