mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-26 10:42:51 +00:00
[fluent-ffmpeg] add more complexFilter parameters (#36239)
* modify compledFilter parameter based on document * add test about complexFilter * add _getArguments() definition
This commit is contained in:
parent
e7b5b2048a
commit
576ade641e
@ -23,6 +23,25 @@ ffmpeg('/path/to/file.avi')
|
||||
.preset('divx')
|
||||
.size('640x480');
|
||||
|
||||
// get arguments
|
||||
ffmpeg('/path/to/file.avi')
|
||||
|
||||
._getArguments();
|
||||
|
||||
// ComplexFilter
|
||||
ffmpeg('/path/to/file.avi')
|
||||
|
||||
.output('outputfile.mp4')
|
||||
.complexFilter([
|
||||
{ inputs: '0:v', filter: 'scale', options: { w: 1920, h: 1080, interl: 1 }, outputs: [] },
|
||||
{ inputs: '0:a', filter: 'amerge', options: { inputs: 2 }, outputs: 'am'},
|
||||
'[am]aresample=48000:async=1[are]',
|
||||
{ inputs: 'are', filter: 'channelsplit' , options: { channel_layout: 'stereo'}, outputs: [] }
|
||||
], [])
|
||||
.audioCodec('libfaac')
|
||||
.videoCodec('libx264')
|
||||
.size('320x200');
|
||||
|
||||
// Use the run() method to run commands with multiple outputs
|
||||
ffmpeg('/path/to/file.avi')
|
||||
.output('outputfile.mp4')
|
||||
|
||||
10
types/fluent-ffmpeg/index.d.ts
vendored
10
types/fluent-ffmpeg/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk <https://github.com/tcaesvk>
|
||||
// DingWeizhe <https://github.com/DingWeizhe>
|
||||
// Mounir Abid <https://github.com/mabidina>
|
||||
// Doyoung Ha <https://github.com/hados99>
|
||||
// Definitions: https://github.com/DefinitelyType/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@ -31,8 +32,8 @@ declare namespace Ffmpeg {
|
||||
|
||||
interface FilterSpecification {
|
||||
filter: string;
|
||||
inputs: string | string[];
|
||||
outputs: string | string[];
|
||||
inputs?: string | string[];
|
||||
outputs?: string | string[];
|
||||
options?: any | string | any[];
|
||||
}
|
||||
|
||||
@ -271,8 +272,8 @@ declare namespace Ffmpeg {
|
||||
outputOption(...options: string[]): FfmpegCommand;
|
||||
outputOptions(options: string[]): FfmpegCommand;
|
||||
outputOptions(...options: string[]): FfmpegCommand;
|
||||
filterGraph(spec: string | FilterSpecification[], map: string[]): FfmpegCommand;
|
||||
complexFilter(spec: string | FilterSpecification[], map: string[]): FfmpegCommand;
|
||||
filterGraph(spec: string | FilterSpecification | Array<string | FilterSpecification>, map: string[]): FfmpegCommand;
|
||||
complexFilter(spec: string | FilterSpecification | Array<string | FilterSpecification>, map: string[]): FfmpegCommand;
|
||||
|
||||
// options/misc
|
||||
usingPreset(proset: string | GetPreset): FfmpegCommand;
|
||||
@ -281,6 +282,7 @@ declare namespace Ffmpeg {
|
||||
// processor
|
||||
renice(niceness: number): FfmpegCommand;
|
||||
kill(signal: string): FfmpegCommand;
|
||||
_getArguments(): string[];
|
||||
|
||||
// capabilities
|
||||
setFfmpegPath(path: string): FfmpegCommand;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user