From 679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 6 Aug 2021 13:35:25 +0200 Subject: Improve target bitrate calculation --- shared/models/videos/video-transcoding.model.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'shared/models/videos/video-transcoding.model.ts') diff --git a/shared/models/videos/video-transcoding.model.ts b/shared/models/videos/video-transcoding.model.ts index f1fe4609b..83b8e98a0 100644 --- a/shared/models/videos/video-transcoding.model.ts +++ b/shared/models/videos/video-transcoding.model.ts @@ -2,13 +2,23 @@ import { VideoResolution } from './video-resolution.enum' // Types used by plugins and ffmpeg-utils -export type EncoderOptionsBuilder = (params: { +export type EncoderOptionsBuilderParams = { input: string + resolution: VideoResolution - inputBitrate: number + + // Could be null for "merge audio" transcoding fps?: number + + // Could be undefined if we could not get input bitrate (some RTMP streams for example) + inputBitrate: number + inputRatio: number + + // For lives streamNum?: number -}) => Promise | EncoderOptions +} + +export type EncoderOptionsBuilder = (params: EncoderOptionsBuilderParams) => Promise | EncoderOptions export interface EncoderOptions { copy?: boolean // Copy stream? Default to false -- cgit v1.2.3