Function: merge()
ts
function merge(urls, options?): Promise<MergeResult>;Concatenate several clips into one file, in order. Clips may differ in resolution, frame rate and codec; they are converted to match the first clip. Only local files are supported.
Parameters
| Parameter | Type | Description |
|---|---|---|
urls | string[] | Local paths of the clips, in playback order. |
options | Partial<MergeOptions> | Output options. |
Returns
Promise<MergeResult>
The path and duration of the merged file, written to the cache directory.
Throws
Error synchronously when urls is empty.
Example
ts
const { outputPath } = await merge([clip1, clip2, clip3]);