aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/video-transcoding.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-06 13:35:25 +0200
committerChocobozzz <me@florianbigard.com>2021-08-06 14:13:26 +0200
commit679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3 (patch)
tree03abf589275db05e5b1fa1c89f57049cd807324a /shared/models/videos/video-transcoding.model.ts
parentc826f34a45757b324a20f71665b44ed10e6953b5 (diff)
downloadPeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.gz
PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.zst
PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.zip
Improve target bitrate calculation
Diffstat (limited to 'shared/models/videos/video-transcoding.model.ts')
-rw-r--r--shared/models/videos/video-transcoding.model.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/shared/models/videos/video-transcoding.model.ts b/shared/models/videos/video-transcoding.model.ts
index f1fe4609b..83b8e98a0 100644
--- a/shared/models/videos/video-transcoding.model.ts
+++ b/shared/models/videos/video-transcoding.model.ts
@@ -2,13 +2,23 @@ import { VideoResolution } from './video-resolution.enum'
2 2
3// Types used by plugins and ffmpeg-utils 3// Types used by plugins and ffmpeg-utils
4 4
5export type EncoderOptionsBuilder = (params: { 5export type EncoderOptionsBuilderParams = {
6 input: string 6 input: string
7
7 resolution: VideoResolution 8 resolution: VideoResolution
8 inputBitrate: number 9
10 // Could be null for "merge audio" transcoding
9 fps?: number 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
10 streamNum?: number 18 streamNum?: number
11}) => Promise<EncoderOptions> | EncoderOptions 19}
20
21export type EncoderOptionsBuilder = (params: EncoderOptionsBuilderParams) => Promise<EncoderOptions> | EncoderOptions
12 22
13export interface EncoderOptions { 23export interface EncoderOptions {
14 copy?: boolean // Copy stream? Default to false 24 copy?: boolean // Copy stream? Default to false