mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Correctly display broken muxing session
Can happen when we stream an audio stream only
This commit is contained in:
parent
ad801093b9
commit
543fbd1ffe
7 changed files with 58 additions and 20 deletions
|
@ -14,7 +14,7 @@ import { removeHLSFileObjectStorageByPath, storeHLSFileFromContent, storeHLSFile
|
|||
import { VideoFileModel } from '@server/models/video/video-file.js'
|
||||
import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist.js'
|
||||
import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models/index.js'
|
||||
import { VideoStorage, VideoStreamingPlaylistType } from '@peertube/peertube-models'
|
||||
import { LiveVideoError, VideoStorage, VideoStreamingPlaylistType } from '@peertube/peertube-models'
|
||||
import {
|
||||
generateHLSMasterPlaylistFilename,
|
||||
generateHlsSha256SegmentsFilename,
|
||||
|
@ -490,10 +490,21 @@ class MuxingSession extends EventEmitter {
|
|||
inputLocalUrl: this.inputLocalUrl,
|
||||
inputPublicUrl: this.inputPublicUrl,
|
||||
|
||||
toTranscode: this.allResolutions.map(resolution => ({
|
||||
resolution,
|
||||
fps: computeOutputFPS({ inputFPS: this.fps, resolution })
|
||||
})),
|
||||
toTranscode: this.allResolutions.map(resolution => {
|
||||
let toTranscodeFPS: number
|
||||
|
||||
try {
|
||||
toTranscodeFPS = computeOutputFPS({ inputFPS: this.fps, resolution })
|
||||
} catch (err) {
|
||||
err.liveVideoErrorCode = LiveVideoError.INVALID_INPUT_VIDEO_STREAM
|
||||
throw err
|
||||
}
|
||||
|
||||
return {
|
||||
resolution,
|
||||
fps: toTranscodeFPS
|
||||
}
|
||||
}),
|
||||
|
||||
fps: this.fps,
|
||||
bitrate: this.bitrate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue