X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo-transcoding.model.ts;h=83b8e98a018e946a435a949697ea96847a86d94d;hb=679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3;hp=52b468a965818e6da2166d91b5456ecd57e1bef2;hpb=5fb7cfbac50e2c55f04182e40bc6f84e5dd4a4da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video-transcoding.model.ts b/shared/models/videos/video-transcoding.model.ts index 52b468a96..83b8e98a0 100644 --- a/shared/models/videos/video-transcoding.model.ts +++ b/shared/models/videos/video-transcoding.model.ts @@ -2,18 +2,33 @@ import { VideoResolution } from './video-resolution.enum' // Types used by plugins and ffmpeg-utils -export type EncoderOptionsBuilder = (params: { +export type EncoderOptionsBuilderParams = { input: string + resolution: VideoResolution + + // 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 - inputOptions: string[] - outputOptions: string[] + scaleFilter?: { + name: string + } + + inputOptions?: string[] + outputOptions?: string[] } // All our encoders