Skip to content

Instantly share code, notes, and snippets.

View njoyard's full-sized avatar

Nicolas Joyard njoyard

View GitHub Profile
@njoyard
njoyard / gist:11304191
Created April 25, 2014 21:37
fluent-ffmpeg size/padding attempt 1
function getScalePadFilters(width, height, aspect, color) {
/*
let a be the input aspect ratio, A be the requested aspect ratio
if a > A, padding is done on top and bottom
if a < A, padding is done on left and right
*/
return [
/*