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

Improve target bitrate calculation

This commit is contained in:
Chocobozzz 2021-08-06 13:35:25 +02:00
parent c826f34a45
commit 679c12e69c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
24 changed files with 263 additions and 204 deletions

View file

@ -54,9 +54,11 @@ 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 bitrate: number
private readonly ratio: number
private readonly videoId: number
private readonly videoUUID: string
private readonly saveReplay: boolean
@ -85,6 +87,7 @@ class MuxingSession extends EventEmitter {
rtmpUrl: string
fps: number
bitrate: number
ratio: number
allResolutions: number[]
}) {
super()
@ -96,7 +99,10 @@ class MuxingSession extends EventEmitter {
this.streamingPlaylist = options.streamingPlaylist
this.rtmpUrl = options.rtmpUrl
this.fps = options.fps
this.bitrate = options.bitrate
this.ratio = options.bitrate
this.allResolutions = options.allResolutions
this.videoId = this.videoLive.Video.id
@ -122,6 +128,7 @@ class MuxingSession extends EventEmitter {
resolutions: this.allResolutions,
fps: this.fps,
bitrate: this.bitrate,
ratio: this.ratio,
availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(),
profile: CONFIG.LIVE.TRANSCODING.PROFILE