1 import { VideoResolution } from '../file/video-resolution.enum'
3 // Types used by plugins and ffmpeg-utils
5 export type EncoderOptionsBuilderParams = {
8 resolution: VideoResolution
10 // If PeerTube applies a filter, transcoding profile must not copy input stream
16 // Could be undefined if we could not get input bitrate (some RTMP streams for example)
24 export type EncoderOptionsBuilder = (params: EncoderOptionsBuilderParams) => Promise<EncoderOptions> | EncoderOptions
26 export interface EncoderOptions {
27 copy?: boolean // Copy stream? Default to false
33 inputOptions?: string[]
34 outputOptions?: string[]
39 export interface EncoderProfile <T> {
40 [ profile: string ]: T
45 export type AvailableEncoders = {
48 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
52 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>