diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-24 14:08:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 10:07:51 +0100 |
commit | 5a547f69d5dc5867e253f7721513479c754b4f15 (patch) | |
tree | 5ccad0e07d04e24d7a4c0b624a46d3b5a93ebce5 /server/lib/live-manager.ts | |
parent | 9252a33d115bba85adcfbc18ab3725924642871c (diff) | |
download | PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.gz PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.zst PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.zip |
Support encoding profiles
Diffstat (limited to 'server/lib/live-manager.ts')
-rw-r--r-- | server/lib/live-manager.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/lib/live-manager.ts b/server/lib/live-manager.ts index b9e5d4561..ee0e4de37 100644 --- a/server/lib/live-manager.ts +++ b/server/lib/live-manager.ts | |||
@@ -22,6 +22,7 @@ import { JobQueue } from './job-queue' | |||
22 | import { PeerTubeSocket } from './peertube-socket' | 22 | import { PeerTubeSocket } from './peertube-socket' |
23 | import { isAbleToUploadVideo } from './user' | 23 | import { isAbleToUploadVideo } from './user' |
24 | import { getHLSDirectory } from './video-paths' | 24 | import { getHLSDirectory } from './video-paths' |
25 | import { availableEncoders } from './video-transcoding-profiles' | ||
25 | 26 | ||
26 | import memoizee = require('memoizee') | 27 | import memoizee = require('memoizee') |
27 | const NodeRtmpServer = require('node-media-server/node_rtmp_server') | 28 | const NodeRtmpServer = require('node-media-server/node_rtmp_server') |
@@ -264,7 +265,16 @@ class LiveManager { | |||
264 | const deleteSegments = videoLive.saveReplay === false | 265 | const deleteSegments = videoLive.saveReplay === false |
265 | 266 | ||
266 | const ffmpegExec = CONFIG.LIVE.TRANSCODING.ENABLED | 267 | const ffmpegExec = CONFIG.LIVE.TRANSCODING.ENABLED |
267 | ? getLiveTranscodingCommand(rtmpUrl, outPath, allResolutions, fps, deleteSegments) | 268 | ? await getLiveTranscodingCommand({ |
269 | rtmpUrl, | ||
270 | outPath, | ||
271 | resolutions: | ||
272 | allResolutions, | ||
273 | fps, | ||
274 | deleteSegments, | ||
275 | availableEncoders, | ||
276 | profile: 'default' | ||
277 | }) | ||
268 | : getLiveMuxingCommand(rtmpUrl, outPath, deleteSegments) | 278 | : getLiveMuxingCommand(rtmpUrl, outPath, deleteSegments) |
269 | 279 | ||
270 | logger.info('Running live muxing/transcoding for %s.', videoUUID) | 280 | logger.info('Running live muxing/transcoding for %s.', videoUUID) |