]>
Commit | Line | Data |
---|---|---|
1896bca0 C |
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 | ||
3e03b961 C |
15 | scaleFilter?: { |
16 | name: string | |
17 | } | |
18 | ||
43f7a43c | 19 | inputOptions?: string[] |
43f7a43c | 20 | outputOptions?: string[] |
1896bca0 C |
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 | } |