1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Support encoding profiles

This commit is contained in:
Chocobozzz 2020-11-24 14:08:23 +01:00 committed by Chocobozzz
parent 9252a33d11
commit 5a547f69d5
9 changed files with 402 additions and 157 deletions

View file

@ -22,6 +22,7 @@ import { JobQueue } from './job-queue'
import { PeerTubeSocket } from './peertube-socket'
import { isAbleToUploadVideo } from './user'
import { getHLSDirectory } from './video-paths'
import { availableEncoders } from './video-transcoding-profiles'
import memoizee = require('memoizee')
const NodeRtmpServer = require('node-media-server/node_rtmp_server')
@ -264,7 +265,16 @@ class LiveManager {
const deleteSegments = videoLive.saveReplay === false
const ffmpegExec = CONFIG.LIVE.TRANSCODING.ENABLED
? getLiveTranscodingCommand(rtmpUrl, outPath, allResolutions, fps, deleteSegments)
? await getLiveTranscodingCommand({
rtmpUrl,
outPath,
resolutions:
allResolutions,
fps,
deleteSegments,
availableEncoders,
profile: 'default'
})
: getLiveMuxingCommand(rtmpUrl, outPath, deleteSegments)
logger.info('Running live muxing/transcoding for %s.', videoUUID)