Skip to content

Commit 4c982f4

Browse files
committed
Allow customizing framerate of the color source
1 parent 89287c8 commit 4c982f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "composable",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"description": "Easily compose complex and reusable ffmpeg filters using JavaScript functions and generate the command string on the fly",
55
"main": "./lib/main.js",
66
"types": "./lib/main.d.ts",

src/Filters/Sources/Color.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ export class ColorSourceFilter extends NativeFilter {
3636
parameters : string[] = [ 'color', 'size', 'rate' ]
3737
}
3838

39-
export function color ( color : string, width : number, height : number, duration : number = null ) : OutputStream {
39+
export function color ( color : string, width : number, height : number, duration : number = null, rate : string | number = null ) : OutputStream {
4040
return new ColorSourceFilter( [ color ], {
4141
size: '' + width + 'x' + height,
42-
rate: '24000/1001',
42+
rate: rate,
4343
duration: duration
4444
} ).outputs[ 0 ];
4545
}

0 commit comments

Comments
 (0)