From 21898711dcdda8d2124c6bd5dbc57bead96616e6 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sat, 3 Dec 2016 14:21:29 +0100 Subject: [PATCH] Support more mkv files https://github.com/mifi/lossless-cut/issues/15 --- package.json | 2 +- src/ffmpeg.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d2cd1926..afad416f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "electron-default-menu": "^1.0.0", "electron-is-dev": "^0.1.2", "execa": "^0.5.0", - "file-type": "^3.9.0", + "file-type": "git+https://github.com/mifi/file-type.git#92b819e349c0067330b10869c67f5b6ad5937994", "jquery": "^3.1.1", "keyboardjs": "^2.3.3", "lodash": "^4.16.4", diff --git a/src/ffmpeg.js b/src/ffmpeg.js index 7d27dac6..3e2dde78 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -78,7 +78,7 @@ function getFormat(filePath) { const formats = (formatsStr || '').split(','); // ffprobe sometimes returns a list of formats, try to be a bit smarter about it. - return readChunk(filePath, 0, 262) + return readChunk(filePath, 0, 4100) .then((bytes) => { const ft = fileType(bytes); if (_.includes(formats, (ft || {}).ext)) return ft.ext;