mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Support max FPS configuration
This commit is contained in:
parent
0bd2474fed
commit
bbaf96d60d
37 changed files with 736 additions and 623 deletions
|
@ -72,6 +72,8 @@ class MuxingSession extends EventEmitter {
|
|||
private readonly inputPublicUrl: string
|
||||
|
||||
private readonly fps: number
|
||||
|
||||
private readonly inputResolution: number
|
||||
private readonly allResolutions: number[]
|
||||
|
||||
private readonly bitrate: number
|
||||
|
@ -125,7 +127,10 @@ class MuxingSession extends EventEmitter {
|
|||
fps: number
|
||||
bitrate: number
|
||||
ratio: number
|
||||
|
||||
inputResolution: number
|
||||
allResolutions: number[]
|
||||
|
||||
hasAudio: boolean
|
||||
hasVideo: boolean
|
||||
probe: FfprobeData
|
||||
|
@ -149,6 +154,7 @@ class MuxingSession extends EventEmitter {
|
|||
this.hasVideo = options.hasVideo
|
||||
this.hasAudio = options.hasAudio
|
||||
|
||||
this.inputResolution = options.inputResolution
|
||||
this.allResolutions = options.allResolutions
|
||||
|
||||
this.videoUUID = this.videoLive.Video.uuid
|
||||
|
@ -547,7 +553,12 @@ class MuxingSession extends EventEmitter {
|
|||
}
|
||||
|
||||
try {
|
||||
toTranscodeFPS = computeOutputFPS({ inputFPS: this.fps, resolution })
|
||||
toTranscodeFPS = computeOutputFPS({
|
||||
inputFPS: this.fps,
|
||||
resolution,
|
||||
isOriginResolution: resolution === this.inputResolution,
|
||||
type: 'live'
|
||||
})
|
||||
} catch (err) {
|
||||
err.liveVideoErrorCode = LiveVideoError.INVALID_INPUT_VIDEO_STREAM
|
||||
throw err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue