diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-live-ending.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-live-ending.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts index 2f3a971bd..1bf43f592 100644 --- a/server/lib/job-queue/handlers/video-live-ending.ts +++ b/server/lib/job-queue/handlers/video-live-ending.ts | |||
@@ -1,25 +1,25 @@ | |||
1 | import { Job } from 'bullmq' | 1 | import { Job } from 'bullmq' |
2 | import { readdir, remove } from 'fs-extra' | 2 | import { readdir, remove } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { ffprobePromise, getAudioStream, getVideoStreamDimensionsInfo } from '@server/helpers/ffmpeg' | ||
5 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' | 4 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
6 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | 5 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' |
7 | import { cleanupAndDestroyPermanentLive, cleanupTMPLiveFiles, cleanupUnsavedNormalLive } from '@server/lib/live' | 6 | import { cleanupAndDestroyPermanentLive, cleanupTMPLiveFiles, cleanupUnsavedNormalLive } from '@server/lib/live' |
8 | import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getLiveReplayBaseDirectory } from '@server/lib/paths' | 7 | import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getLiveReplayBaseDirectory } from '@server/lib/paths' |
9 | import { generateVideoMiniature } from '@server/lib/thumbnail' | 8 | import { generateVideoMiniature } from '@server/lib/thumbnail' |
10 | import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/transcoding' | 9 | import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/hls-transcoding' |
10 | import { VideoPathManager } from '@server/lib/video-path-manager' | ||
11 | import { moveToNextState } from '@server/lib/video-state' | 11 | import { moveToNextState } from '@server/lib/video-state' |
12 | import { VideoModel } from '@server/models/video/video' | 12 | import { VideoModel } from '@server/models/video/video' |
13 | import { VideoBlacklistModel } from '@server/models/video/video-blacklist' | 13 | import { VideoBlacklistModel } from '@server/models/video/video-blacklist' |
14 | import { VideoFileModel } from '@server/models/video/video-file' | 14 | import { VideoFileModel } from '@server/models/video/video-file' |
15 | import { VideoLiveModel } from '@server/models/video/video-live' | 15 | import { VideoLiveModel } from '@server/models/video/video-live' |
16 | import { VideoLiveReplaySettingModel } from '@server/models/video/video-live-replay-setting' | ||
16 | import { VideoLiveSessionModel } from '@server/models/video/video-live-session' | 17 | import { VideoLiveSessionModel } from '@server/models/video/video-live-session' |
17 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 18 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
18 | import { MVideo, MVideoLive, MVideoLiveSession, MVideoWithAllFiles } from '@server/types/models' | 19 | import { MVideo, MVideoLive, MVideoLiveSession, MVideoWithAllFiles } from '@server/types/models' |
20 | import { ffprobePromise, getAudioStream, getVideoStreamDimensionsInfo, getVideoStreamFPS } from '@shared/ffmpeg' | ||
19 | import { ThumbnailType, VideoLiveEndingPayload, VideoState } from '@shared/models' | 21 | import { ThumbnailType, VideoLiveEndingPayload, VideoState } from '@shared/models' |
20 | import { logger, loggerTagsFactory } from '../../../helpers/logger' | 22 | import { logger, loggerTagsFactory } from '../../../helpers/logger' |
21 | import { VideoPathManager } from '@server/lib/video-path-manager' | ||
22 | import { VideoLiveReplaySettingModel } from '@server/models/video/video-live-replay-setting' | ||
23 | 23 | ||
24 | const lTags = loggerTagsFactory('live', 'job') | 24 | const lTags = loggerTagsFactory('live', 'job') |
25 | 25 | ||
@@ -224,6 +224,7 @@ async function assignReplayFilesToVideo (options: { | |||
224 | const probe = await ffprobePromise(concatenatedTsFilePath) | 224 | const probe = await ffprobePromise(concatenatedTsFilePath) |
225 | const { audioStream } = await getAudioStream(concatenatedTsFilePath, probe) | 225 | const { audioStream } = await getAudioStream(concatenatedTsFilePath, probe) |
226 | const { resolution } = await getVideoStreamDimensionsInfo(concatenatedTsFilePath, probe) | 226 | const { resolution } = await getVideoStreamDimensionsInfo(concatenatedTsFilePath, probe) |
227 | const fps = await getVideoStreamFPS(concatenatedTsFilePath, probe) | ||
227 | 228 | ||
228 | try { | 229 | try { |
229 | await generateHlsPlaylistResolutionFromTS({ | 230 | await generateHlsPlaylistResolutionFromTS({ |
@@ -231,6 +232,7 @@ async function assignReplayFilesToVideo (options: { | |||
231 | inputFileMutexReleaser, | 232 | inputFileMutexReleaser, |
232 | concatenatedTsFilePath, | 233 | concatenatedTsFilePath, |
233 | resolution, | 234 | resolution, |
235 | fps, | ||
234 | isAAC: audioStream?.codec_name === 'aac' | 236 | isAAC: audioStream?.codec_name === 'aac' |
235 | }) | 237 | }) |
236 | } catch (err) { | 238 | } catch (err) { |