diff --git a/README.md b/README.md index 228d476..1141c04 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,8 @@ export interface EncoderConfig { postFix: string /** extension of the new file (e.g. .mp4) */ extension?: string + /** custom options. Ignores all other options */ + custom?: string /** discard streams */ discard?: { video?: boolean diff --git a/src/background/renderer.ts b/src/background/renderer.ts index a0ba5d4..4d5111b 100644 --- a/src/background/renderer.ts +++ b/src/background/renderer.ts @@ -73,6 +73,12 @@ export class Renderer extends EventEmitter { private _getProcessArgs(step: RenderWorkstep) { const args = ['-y', '-i', `"${step.input}"`] + if (step.encoderConfig.custom) { + args.push(step.encoderConfig.custom) + args.push(`"${step.output}"`) + return args + } + const discard = step.encoderConfig.discard || {} if (discard.video) { diff --git a/src/types/config.ts b/src/types/config.ts index ec9154d..7372184 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -10,6 +10,8 @@ export interface EncoderConfig { postFix: string /** extension of the new file (e.g. .mp4) */ extension?: string + /** custom options. Ignores all other options */ + custom?: string /** discard streams */ discard?: { video?: boolean