Comparing version 0.0.12 to 0.0.13
{ | ||
"name": "js-ffmpeg", | ||
"description": "JS FFMpeg", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"author": "Ziggeo", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/jsonize/js-ffmpeg", |
@@ -1,2 +0,2 @@ | ||
# js-ffmpeg 0.0.11 | ||
# js-ffmpeg 0.0.13 | ||
@@ -3,0 +3,0 @@ This is a simple wrapper for FFMPEG and FFPROBE. |
@@ -167,2 +167,3 @@ Scoped.require([ | ||
var vfilters = []; | ||
var sizing = ""; | ||
@@ -173,3 +174,3 @@ if (options.auto_rotate && source.video.rotation) { | ||
} | ||
if (source.video.rotation >= 180) { | ||
if (source.video.rotation === 180) { | ||
vfilters.push("hflip,vflip"); | ||
@@ -279,19 +280,9 @@ } | ||
if (vfilters.length > 0) { | ||
args.push("-vf"); | ||
args.push(vfilters.join(",")); | ||
} | ||
if (!padded && !cropped) { | ||
args.push("-s"); | ||
args.push(targetWidth + "x" + targetHeight); | ||
} | ||
} else { | ||
if (vfilters.length > 0) { | ||
args.push("-vf"); | ||
args.push(vfilters.join(",")); | ||
} | ||
} | ||
if (!padded && !cropped) | ||
sizing = targetWidth + "x" + targetHeight; | ||
} | ||
vfilters = vfilters.join(","); | ||
/* | ||
@@ -315,8 +306,20 @@ * | ||
var posY = options.watermark_y * (targetHeight - scaleHeight); | ||
var v = vfilters ? vfilters + "[next];[next]": ""; | ||
vfilters = "movie=" + watermarkInfo.filename + "," + | ||
"scale=" + [Math.round(scaleWidth), Math.round(scaleHeight)].join(":") + "[wm];[in]" + v + "[wm]" + | ||
"overlay=" + [Math.round(posX), Math.round(posY)].join(":") + "[out]"; | ||
} | ||
// Video Filters | ||
if (vfilters) { | ||
args.push("-vf"); | ||
args.push("movie=" + watermarkInfo.filename + "," + | ||
"scale=" + [Math.round(scaleWidth), Math.round(scaleHeight)].join(":") + "[wm];[in][wm]" + | ||
"overlay=" + [Math.round(posX), Math.round(posY)].join(":") + "[out]"); | ||
args.push(vfilters); | ||
} | ||
if (sizing) { | ||
args.push("-s"); | ||
args.push(sizing); | ||
} | ||
} | ||
@@ -323,0 +326,0 @@ |
308943