diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-06 10:39:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-06 10:39:40 +0200 |
commit | c826f34a45757b324a20f71665b44ed10e6953b5 (patch) | |
tree | ff29bdff8b4519bbdbbcd3aa0d68521ce2b06ff5 /server/lib/live/shared | |
parent | 421ff4618da64f0849353383f690a014024c40da (diff) | |
download | PeerTube-c826f34a45757b324a20f71665b44ed10e6953b5.tar.gz PeerTube-c826f34a45757b324a20f71665b44ed10e6953b5.tar.zst PeerTube-c826f34a45757b324a20f71665b44ed10e6953b5.zip |
Limit live bitrate
Diffstat (limited to 'server/lib/live/shared')
-rw-r--r-- | server/lib/live/shared/muxing-session.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/live/shared/muxing-session.ts b/server/lib/live/shared/muxing-session.ts index 709d6c615..62708b14b 100644 --- a/server/lib/live/shared/muxing-session.ts +++ b/server/lib/live/shared/muxing-session.ts | |||
@@ -54,6 +54,7 @@ class MuxingSession extends EventEmitter { | |||
54 | private readonly streamingPlaylist: MStreamingPlaylistVideo | 54 | private readonly streamingPlaylist: MStreamingPlaylistVideo |
55 | private readonly rtmpUrl: string | 55 | private readonly rtmpUrl: string |
56 | private readonly fps: number | 56 | private readonly fps: number |
57 | private readonly bitrate: number | ||
57 | private readonly allResolutions: number[] | 58 | private readonly allResolutions: number[] |
58 | 59 | ||
59 | private readonly videoId: number | 60 | private readonly videoId: number |
@@ -83,6 +84,7 @@ class MuxingSession extends EventEmitter { | |||
83 | streamingPlaylist: MStreamingPlaylistVideo | 84 | streamingPlaylist: MStreamingPlaylistVideo |
84 | rtmpUrl: string | 85 | rtmpUrl: string |
85 | fps: number | 86 | fps: number |
87 | bitrate: number | ||
86 | allResolutions: number[] | 88 | allResolutions: number[] |
87 | }) { | 89 | }) { |
88 | super() | 90 | super() |
@@ -94,6 +96,7 @@ class MuxingSession extends EventEmitter { | |||
94 | this.streamingPlaylist = options.streamingPlaylist | 96 | this.streamingPlaylist = options.streamingPlaylist |
95 | this.rtmpUrl = options.rtmpUrl | 97 | this.rtmpUrl = options.rtmpUrl |
96 | this.fps = options.fps | 98 | this.fps = options.fps |
99 | this.bitrate = options.bitrate | ||
97 | this.allResolutions = options.allResolutions | 100 | this.allResolutions = options.allResolutions |
98 | 101 | ||
99 | this.videoId = this.videoLive.Video.id | 102 | this.videoId = this.videoLive.Video.id |
@@ -118,6 +121,8 @@ class MuxingSession extends EventEmitter { | |||
118 | 121 | ||
119 | resolutions: this.allResolutions, | 122 | resolutions: this.allResolutions, |
120 | fps: this.fps, | 123 | fps: this.fps, |
124 | bitrate: this.bitrate, | ||
125 | |||
121 | availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(), | 126 | availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(), |
122 | profile: CONFIG.LIVE.TRANSCODING.PROFILE | 127 | profile: CONFIG.LIVE.TRANSCODING.PROFILE |
123 | }) | 128 | }) |