]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video-transcoding.model.ts
Merge branch 'release/3.2.0' into develop
[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 fps?: number
9 streamNum?: number
10 }) => Promise<EncoderOptions> | EncoderOptions
11
12 export interface EncoderOptions {
13 copy?: boolean // Copy stream? Default to false
14
15 scaleFilter?: {
16 name: string
17 }
18
19 inputOptions?: string[]
20 outputOptions?: string[]
21 }
22
23 // All our encoders
24
25 export interface EncoderProfile <T> {
26 [ profile: string ]: T
27
28 default: T
29 }
30
31 export type AvailableEncoders = {
32 available: {
33 live: {
34 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
35 }
36
37 vod: {
38 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
39 }
40 }
41
42 encodersToTry: {
43 vod: {
44 video: string[]
45 audio: string[]
46 }
47
48 live: {
49 video: string[]
50 audio: string[]
51 }
52 }
53 }