From 22602ce6b0d8b4571255ad01f7b898071760c611 Mon Sep 17 00:00:00 2001 From: jeromewu Date: Wed, 15 Jan 2020 00:50:32 +0000 Subject: [PATCH] Add node version limitation --- README.md | 3 +++ docs/api.md | 8 ++++++++ package.json | 3 +++ 3 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 0442f9a..917dd0f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ # ffmpeg.js +[![Node Version](https://img.shields.io/node/v/@ffmpeg/ffmpeg.svg)](https://img.shields.io/node/v/@ffmpeg/ffmpeg.svg) [![Actions Status](https://github.com/ffmpegjs/ffmpeg.js/workflows/CI/badge.svg)](https://github.com/ffmpegjs/ffmpeg.js/actions) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/ffmpegjs/ffmpeg.js/graphs/commit-activity) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) @@ -60,6 +61,8 @@ const worker = createWorker(); $ npm install @ffmpeg/ffmpeg ``` +> As we use `worker_threads` which was introduced in Node.js v10.5.0, please remember to add `--experimental-worker` if you are using Node.js v10, and you don't have to add anything if you are using Node.js v12 + ## Documentation - [API](https://github.com/ffmpegjs/ffmpeg.js/blob/master/docs/api.md) diff --git a/docs/api.md b/docs/api.md index 3aeef4c..945ae40 100644 --- a/docs/api.md +++ b/docs/api.md @@ -204,6 +204,14 @@ Worker.concatDemuxer() concatenates multiple videos using concatDemuxer. This me })(); ``` +If the input video files are the same as the output video file, you can pass an extra option to speed up the process + +```javascript +(async () => { + await worker.concatDemuxer(["flame-1.mp4", "flame-2.mp4"], "output.mp4", "-c copy"); +})(); +``` + ### Worker.run(args, jobId): Promise diff --git a/package.json b/package.json index b6223eb..7976e7a 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,9 @@ "bugs": { "url": "https://github.com/ffmpegjs/ffmpeg.js/issues" }, + "engines": { + "node": ">=10.5.0" + }, "homepage": "https://github.com/ffmpegjs/ffmpeg.js#readme", "dependencies": { "@ffmpeg/core": "^0.6.0",