1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Limit live bitrate

This commit is contained in:
Chocobozzz 2021-08-06 10:39:40 +02:00
parent 421ff4618d
commit c826f34a45
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 122 additions and 51 deletions

View file

@ -54,6 +54,7 @@ class MuxingSession extends EventEmitter {
private readonly streamingPlaylist: MStreamingPlaylistVideo
private readonly rtmpUrl: string
private readonly fps: number
private readonly bitrate: number
private readonly allResolutions: number[]
private readonly videoId: number
@ -83,6 +84,7 @@ class MuxingSession extends EventEmitter {
streamingPlaylist: MStreamingPlaylistVideo
rtmpUrl: string
fps: number
bitrate: number
allResolutions: number[]
}) {
super()
@ -94,6 +96,7 @@ class MuxingSession extends EventEmitter {
this.streamingPlaylist = options.streamingPlaylist
this.rtmpUrl = options.rtmpUrl
this.fps = options.fps
this.bitrate = options.bitrate
this.allResolutions = options.allResolutions
this.videoId = this.videoLive.Video.id
@ -118,6 +121,8 @@ class MuxingSession extends EventEmitter {
resolutions: this.allResolutions,
fps: this.fps,
bitrate: this.bitrate,
availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(),
profile: CONFIG.LIVE.TRANSCODING.PROFILE
})