diff options
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-transcoding.model.ts | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index abf144f23..fac3e0b2f 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -34,6 +34,7 @@ export * from './video-state.enum' | |||
34 | export * from './video-streaming-playlist.model' | 34 | export * from './video-streaming-playlist.model' |
35 | export * from './video-streaming-playlist.type' | 35 | export * from './video-streaming-playlist.type' |
36 | 36 | ||
37 | export * from './video-transcoding.model' | ||
37 | export * from './video-transcoding-fps.model' | 38 | export * from './video-transcoding-fps.model' |
38 | 39 | ||
39 | export * from './video-update.model' | 40 | export * from './video-update.model' |
diff --git a/shared/models/videos/video-transcoding.model.ts b/shared/models/videos/video-transcoding.model.ts new file mode 100644 index 000000000..06b555c16 --- /dev/null +++ b/shared/models/videos/video-transcoding.model.ts | |||
@@ -0,0 +1,48 @@ | |||
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 | outputOptions: string[] | ||
16 | } | ||
17 | |||
18 | // All our encoders | ||
19 | |||
20 | export interface EncoderProfile <T> { | ||
21 | [ profile: string ]: T | ||
22 | |||
23 | default: T | ||
24 | } | ||
25 | |||
26 | export type AvailableEncoders = { | ||
27 | available: { | ||
28 | live: { | ||
29 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
30 | } | ||
31 | |||
32 | vod: { | ||
33 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
34 | } | ||
35 | } | ||
36 | |||
37 | encodersToTry: { | ||
38 | vod: { | ||
39 | video: string[] | ||
40 | audio: string[] | ||
41 | } | ||
42 | |||
43 | live: { | ||
44 | video: string[] | ||
45 | audio: string[] | ||
46 | } | ||
47 | } | ||
48 | } | ||