You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
-[Worker.remove](#worker-remove)
9
9
-[Worker.transcode](#worker-transcode)
10
10
-[Worker.trim](#worker-trim)
11
+
-[Worker.concatDemuxer](#worker-concatDemuxer)
11
12
-[Worker.run](#worker-run)
12
13
13
14
---
@@ -135,14 +136,14 @@ Worker.remove() removes files in file system, it will be better to delete unused
135
136
136
137
<aname="worker-transcode"></a>
137
138
138
-
### Worker.transcode(inputPath, outputPath, options, del, jobId): Promise
139
+
### Worker.transcode(input, output, options, del, jobId): Promise
139
140
140
141
Worker.transcode() transcode a video file to another format.
141
142
142
143
**Arguments:**
143
144
144
-
-`inputPath` input file path, the input file should be written through Worker.write()
145
-
-`outputPath` output file path, can be read with Worker.read() later
145
+
-`input` input file path, the input file should be written through Worker.write()
146
+
-`output` output file path, can be read with Worker.read() later
146
147
-`options` a string to add extra arguments to ffmpeg
147
148
-`del` a boolean to determine whether to delete input file after the task is done, default: true
148
149
-`jobId` check Worker.load()
@@ -157,7 +158,7 @@ Worker.transcode() transcode a video file to another format.
157
158
158
159
<aname="worker-trim"></a>
159
160
160
-
### Worker.trim(inputPath, outputPath, from, to, options, del, jobId): Promise
161
+
### Worker.trim(input, output, from, to, options, del, jobId): Promise
161
162
162
163
Worker.trim() trims video to specific interval.
163
164
@@ -181,14 +182,14 @@ Worker.trim() trims video to specific interval.
181
182
182
183
<aname="worker-concatDemuxer"></a>
183
184
184
-
### Worker.concatDemuxer(inputPaths, outputPath, options, del, jobId): Promise
185
+
### Worker.concatDemuxer(input, output, options, del, jobId): Promise
185
186
186
187
Worker.concatDemuxer() concatenates multiple videos using concatDemuxer. This method won't encode the videos again. But it has its limitations. See [Concat demuxer Wiki](https://trac.ffmpeg.org/wiki/Concatenate)
187
188
188
189
**Arguments:**
189
190
190
-
-`inputPaths` input file paths as an Array, the input files should be written through Worker.write()
191
-
-`outputPath` output file path, can be read with Worker.read() later
191
+
-`input` input file paths as an Array, the input files should be written through Worker.write()
192
+
-`output` output file path, can be read with Worker.read() later
192
193
-`options` a string to add extra arguments to ffmpeg
193
194
-`del` a boolean to determine whether to delete input file after the task is done, default: true
194
195
-`jobId` check Worker.load()
@@ -197,7 +198,7 @@ Worker.concatDemuxer() concatenates multiple videos using concatDemuxer. This me
@@ -210,16 +211,19 @@ Worker.run() is similar to FFmpeg cli tool, aims to provide maximum flexiblity f
210
211
**Arguments:**
211
212
212
213
-`args` a string to represent arguments, note: inputPath must start with `/data/` as worker.write write to this path by default.
213
-
-`options` a object to define the value for inputPath, outputPath and del.
214
+
-`options` a object to define the value for input, output and del.
215
+
-`input` a string or an array of strings to indicate input files, ffmpeg.js deletes these files for you.
216
+
-`output` a string or an array of strings to indicate output files, ffmpeg.js moves these files to `/data`, deletes them from MEMFS and you can read them with Worker.read()
217
+
-`del` a boolean to determine whether to delete input file after the task is done, default: true
0 commit comments