diff --git a/lib/metadata.js b/lib/metadata.js index ba661b23..684ae801 100644 --- a/lib/metadata.js +++ b/lib/metadata.js @@ -31,12 +31,17 @@ var meta = module.exports = { var is_synched = (/start: 0.000000/.exec(stderr) != null); var rotate = /rotate[\s]+:[\s]([\d]{2,3})/.exec(stderr); - console.log(stderr); // get ffmpeg version - var getVersion = /ffmpeg version ([0-9\.]+) C/.exec(stderr); + var getVersion = /ffmpeg version (?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)/.exec(stderr); var ffmpegVersion = 0; if (getVersion) { - ffmpegVersion = getVersion[1]; + if (!getVersion[2]) { + getVersion[2] = getVersion[3]; + } + ffmpegVersion = getVersion[1] + '.' + getVersion[2]; + if (!getVersion[3]) { + ffmpegVersion += '.' + getVersion[3]; + } } // build return object diff --git a/test/conversion.test.js b/test/conversion.test.js index f6bbb479..3a57f434 100644 --- a/test/conversion.test.js +++ b/test/conversion.test.js @@ -32,7 +32,6 @@ module.exports = testCase({ .usingPreset('flashvideo') .renice(19) .saveToFile(testFile, function(stdout, stderr, err) { - console.log(stderr); test.ok(!err); path.exists(testFile, function(exist) { test.ok(exist);