diff options
Diffstat (limited to 'server/lib/live-manager.ts')
-rw-r--r-- | server/lib/live-manager.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/lib/live-manager.ts b/server/lib/live-manager.ts index 4d2e9b1b3..b9e5d4561 100644 --- a/server/lib/live-manager.ts +++ b/server/lib/live-manager.ts | |||
@@ -4,7 +4,7 @@ import { FfmpegCommand } from 'fluent-ffmpeg' | |||
4 | import { ensureDir, stat } from 'fs-extra' | 4 | import { ensureDir, stat } from 'fs-extra' |
5 | import { basename } from 'path' | 5 | import { basename } from 'path' |
6 | import { isTestInstance } from '@server/helpers/core-utils' | 6 | import { isTestInstance } from '@server/helpers/core-utils' |
7 | import { runLiveMuxing, runLiveTranscoding } from '@server/helpers/ffmpeg-utils' | 7 | import { getLiveMuxingCommand, getLiveTranscodingCommand } from '@server/helpers/ffmpeg-utils' |
8 | import { computeResolutionsToTranscode, getVideoFileFPS, getVideoFileResolution } from '@server/helpers/ffprobe-utils' | 8 | import { computeResolutionsToTranscode, getVideoFileFPS, getVideoFileResolution } from '@server/helpers/ffprobe-utils' |
9 | import { logger } from '@server/helpers/logger' | 9 | import { logger } from '@server/helpers/logger' |
10 | import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' | 10 | import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' |
@@ -264,8 +264,8 @@ class LiveManager { | |||
264 | const deleteSegments = videoLive.saveReplay === false | 264 | const deleteSegments = videoLive.saveReplay === false |
265 | 265 | ||
266 | const ffmpegExec = CONFIG.LIVE.TRANSCODING.ENABLED | 266 | const ffmpegExec = CONFIG.LIVE.TRANSCODING.ENABLED |
267 | ? runLiveTranscoding(rtmpUrl, outPath, allResolutions, fps, deleteSegments) | 267 | ? getLiveTranscodingCommand(rtmpUrl, outPath, allResolutions, fps, deleteSegments) |
268 | : runLiveMuxing(rtmpUrl, outPath, deleteSegments) | 268 | : getLiveMuxingCommand(rtmpUrl, outPath, deleteSegments) |
269 | 269 | ||
270 | logger.info('Running live muxing/transcoding for %s.', videoUUID) | 270 | logger.info('Running live muxing/transcoding for %s.', videoUUID) |
271 | this.transSessions.set(sessionId, ffmpegExec) | 271 | this.transSessions.set(sessionId, ffmpegExec) |
@@ -382,6 +382,8 @@ class LiveManager { | |||
382 | }) | 382 | }) |
383 | 383 | ||
384 | ffmpegExec.on('end', () => onFFmpegEnded()) | 384 | ffmpegExec.on('end', () => onFFmpegEnded()) |
385 | |||
386 | ffmpegExec.run() | ||
385 | } | 387 | } |
386 | 388 | ||
387 | private async onEndTransmuxing (videoId: number, cleanupNow = false) { | 389 | private async onEndTransmuxing (videoId: number, cleanupNow = false) { |