Skip to content

Instantly share code, notes, and snippets.

@jmcbee jmcbee/ffmpeg.sh
Last active Aug 29, 2015

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.