Comparing version 0.0.24 to 0.0.25
@@ -13,3 +13,5 @@ Scoped = global.Scoped || require("betajs-scoped"); | ||
ffprobe_simple: require(__dirname + "/src/ffprobe-simple.js").ffprobe_simple, | ||
ffmpeg_simple_raw: require(__dirname + "/src/ffmpeg-simple.js").ffmpeg_simple_raw, | ||
ffmpeg_simple: require(__dirname + "/src/ffmpeg-simple.js").ffmpeg_simple, | ||
@@ -16,0 +18,0 @@ |
{ | ||
"name": "js-ffmpeg", | ||
"description": "JS FFMpeg", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"author": "Ziggeo", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/jsonize/js-ffmpeg", |
@@ -15,4 +15,16 @@ Scoped.require([ | ||
module.exports = { | ||
ffmpeg_simple: function (files, options, output, eventCallback, eventContext, opts) { | ||
return this.ffmpeg_simple_raw(files, options, output, eventCallback, eventContext, opts).mapError(function (e) { | ||
if (e.message) { | ||
if (e.message.indexOf("Too many packets buffered for output stream") >= 0 && !options.maxMuxingQueueSize) { | ||
options.maxMuxingQueueSize = true; | ||
return this.ffmpeg_simple_raw(files, options, output, eventCallback, eventContext, opts); | ||
} | ||
} | ||
return e; | ||
}, this); | ||
}, | ||
ffmpeg_simple: function (files, options, output, eventCallback, eventContext, opts) { | ||
ffmpeg_simple_raw: function (files, options, output, eventCallback, eventContext, opts) { | ||
opts = opts || {}; | ||
@@ -58,3 +70,5 @@ if (Types.is_string(files)) | ||
watermarks: [] | ||
watermarks: [], | ||
maxMuxingQueueSize: false | ||
}, options); | ||
@@ -436,2 +450,8 @@ | ||
// Workaround for https://trac.ffmpeg.org/ticket/6375 | ||
if (options.maxMuxingQueueSize) { | ||
args.push("-max_muxing_queue_size"); | ||
args.push("9999"); | ||
} | ||
//} catch(e) {console.log(e);} | ||
@@ -438,0 +458,0 @@ |
838566
1795
44