]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video-transcoding.model.ts
Limit live bitrate
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video-transcoding.model.ts
1 import { VideoResolution } from './video-resolution.enum'
2
3 // Types used by plugins and ffmpeg-utils
4
5 export type EncoderOptionsBuilder = (params: {
6 input: string
7 resolution: VideoResolution
8 inputBitrate: number
9 fps?: number
10 streamNum?: number
11 }) => Promise<EncoderOptions> | EncoderOptions
12
13 export interface EncoderOptions {
14 copy?: boolean // Copy stream? Default to false
15
16 scaleFilter?: {
17 name: string
18 }
19
20 inputOptions?: string[]
21 outputOptions?: string[]
22 }
23
24 // All our encoders
25
26 export interface EncoderProfile <T> {
27 [ profile: string ]: T
28
29 default: T
30 }
31
32 export type AvailableEncoders = {
33 available: {
34 live: {
35 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
36 }
37
38 vod: {
39 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
40 }
41 }
42
43 encodersToTry: {
44 vod: {
45 video: string[]
46 audio: string[]
47 }
48
49 live: {
50 video: string[]
51 audio: string[]
52 }
53 }
54 }