]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video-transcoding.model.ts
ffb0115dceafcef5e6c6fe1742200a4f13410863
[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 inputOptions?: string[]
16 videoFilters?: string[]
17 outputOptions?: string[]
18 }
19
20 // All our encoders
21
22 export interface EncoderProfile <T> {
23 [ profile: string ]: T
24
25 default: T
26 }
27
28 export type AvailableEncoders = {
29 available: {
30 live: {
31 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
32 }
33
34 vod: {
35 [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
36 }
37 }
38
39 encodersToTry: {
40 vod: {
41 video: string[]
42 audio: string[]
43 }
44
45 live: {
46 video: string[]
47 audio: string[]
48 }
49 }
50 }