diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-18 14:35:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 15:20:57 +0100 |
commit | ad5db1044c8599eaaaa2a578b350777ae996b068 (patch) | |
tree | 3e003cccf021152405d49b21c6c91b703c8ae96c /shared/models/videos/video-transcoding.model.ts | |
parent | b46cf4b920984492df598c1b61179acfc7f6f22e (diff) | |
download | PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip |
Add ability to run transcoding jobs
Diffstat (limited to 'shared/models/videos/video-transcoding.model.ts')
-rw-r--r-- | shared/models/videos/video-transcoding.model.ts | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/shared/models/videos/video-transcoding.model.ts b/shared/models/videos/video-transcoding.model.ts deleted file mode 100644 index 83b8e98a0..000000000 --- a/shared/models/videos/video-transcoding.model.ts +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | import { VideoResolution } from './video-resolution.enum' | ||
2 | |||
3 | // Types used by plugins and ffmpeg-utils | ||
4 | |||
5 | export type EncoderOptionsBuilderParams = { | ||
6 | input: string | ||
7 | |||
8 | resolution: VideoResolution | ||
9 | |||
10 | // Could be null for "merge audio" transcoding | ||
11 | fps?: number | ||
12 | |||
13 | // Could be undefined if we could not get input bitrate (some RTMP streams for example) | ||
14 | inputBitrate: number | ||
15 | inputRatio: number | ||
16 | |||
17 | // For lives | ||
18 | streamNum?: number | ||
19 | } | ||
20 | |||
21 | export type EncoderOptionsBuilder = (params: EncoderOptionsBuilderParams) => Promise<EncoderOptions> | EncoderOptions | ||
22 | |||
23 | export interface EncoderOptions { | ||
24 | copy?: boolean // Copy stream? Default to false | ||
25 | |||
26 | scaleFilter?: { | ||
27 | name: string | ||
28 | } | ||
29 | |||
30 | inputOptions?: string[] | ||
31 | outputOptions?: string[] | ||
32 | } | ||
33 | |||
34 | // All our encoders | ||
35 | |||
36 | export interface EncoderProfile <T> { | ||
37 | [ profile: string ]: T | ||
38 | |||
39 | default: T | ||
40 | } | ||
41 | |||
42 | export type AvailableEncoders = { | ||
43 | available: { | ||
44 | live: { | ||
45 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
46 | } | ||
47 | |||
48 | vod: { | ||
49 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
50 | } | ||
51 | } | ||
52 | |||
53 | encodersToTry: { | ||
54 | vod: { | ||
55 | video: string[] | ||
56 | audio: string[] | ||
57 | } | ||
58 | |||
59 | live: { | ||
60 | video: string[] | ||
61 | audio: string[] | ||
62 | } | ||
63 | } | ||
64 | } | ||