aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-23 16:23:52 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commit9252a33d115bba85adcfbc18ab3725924642871c (patch)
tree94365b67fc25cb0d9ce046a820d07344742179f6 /server/lib/live-manager.ts
parentdaf6e4801052d3ca6be2fafd20bae2323b1ce175 (diff)
downloadPeerTube-9252a33d115bba85adcfbc18ab3725924642871c.tar.gz
PeerTube-9252a33d115bba85adcfbc18ab3725924642871c.tar.zst
PeerTube-9252a33d115bba85adcfbc18ab3725924642871c.zip
Export encoders options in a dedicated struct
Diffstat (limited to 'server/lib/live-manager.ts')
-rw-r--r--server/lib/live-manager.ts8
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'
4import { ensureDir, stat } from 'fs-extra' 4import { ensureDir, stat } from 'fs-extra'
5import { basename } from 'path' 5import { basename } from 'path'
6import { isTestInstance } from '@server/helpers/core-utils' 6import { isTestInstance } from '@server/helpers/core-utils'
7import { runLiveMuxing, runLiveTranscoding } from '@server/helpers/ffmpeg-utils' 7import { getLiveMuxingCommand, getLiveTranscodingCommand } from '@server/helpers/ffmpeg-utils'
8import { computeResolutionsToTranscode, getVideoFileFPS, getVideoFileResolution } from '@server/helpers/ffprobe-utils' 8import { computeResolutionsToTranscode, getVideoFileFPS, getVideoFileResolution } from '@server/helpers/ffprobe-utils'
9import { logger } from '@server/helpers/logger' 9import { logger } from '@server/helpers/logger'
10import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' 10import { 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) {