aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/live')
-rw-r--r--server/lib/live/live-manager.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index c78cf82eb..6d51f4de7 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -6,6 +6,7 @@ import { logger, loggerTagsFactory } from '@server/helpers/logger'
6import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' 6import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config'
7import { VIDEO_LIVE } from '@server/initializers/constants' 7import { VIDEO_LIVE } from '@server/initializers/constants'
8import { sequelizeTypescript } from '@server/initializers/database' 8import { sequelizeTypescript } from '@server/initializers/database'
9import { RunnerJobModel } from '@server/models/runner/runner-job'
9import { UserModel } from '@server/models/user/user' 10import { UserModel } from '@server/models/user/user'
10import { VideoModel } from '@server/models/video/video' 11import { VideoModel } from '@server/models/video/video'
11import { VideoLiveModel } from '@server/models/video/video-live' 12import { VideoLiveModel } from '@server/models/video/video-live'
@@ -25,7 +26,6 @@ import { computeResolutionsToTranscode } from '../transcoding/transcoding-resolu
25import { LiveQuotaStore } from './live-quota-store' 26import { LiveQuotaStore } from './live-quota-store'
26import { cleanupAndDestroyPermanentLive, getLiveSegmentTime } from './live-utils' 27import { cleanupAndDestroyPermanentLive, getLiveSegmentTime } from './live-utils'
27import { MuxingSession } from './shared' 28import { MuxingSession } from './shared'
28import { RunnerJobModel } from '@server/models/runner/runner-job'
29 29
30const NodeRtmpSession = require('node-media-server/src/node_rtmp_session') 30const NodeRtmpSession = require('node-media-server/src/node_rtmp_session')
31const context = require('node-media-server/src/node_core_ctx') 31const context = require('node-media-server/src/node_core_ctx')
@@ -80,6 +80,9 @@ class LiveManager {
80 80
81 events.on('donePublish', sessionId => { 81 events.on('donePublish', sessionId => {
82 logger.info('Live session ended.', { sessionId, ...lTags(sessionId) }) 82 logger.info('Live session ended.', { sessionId, ...lTags(sessionId) })
83
84 // Force session aborting, so we kill ffmpeg even if it still has data to process (slow CPU)
85 setTimeout(() => this.abortSession(sessionId), 2000)
83 }) 86 })
84 87
85 registerConfigChangedHandler(() => { 88 registerConfigChangedHandler(() => {