1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Allow to specify transcoding and import jobs concurrency

This commit is contained in:
Chocobozzz 2021-02-08 10:51:10 +01:00 committed by Chocobozzz
parent 81b46cbc34
commit 9129b7694d
22 changed files with 133 additions and 33 deletions

View file

@ -272,7 +272,7 @@ async function generateHlsPlaylistCommon (options: {
const { type, video, inputPath, resolution, copyCodecs, isPortraitMode, isAAC, job } = options
const transcodeDirectory = CONFIG.STORAGE.TMP_DIR
const videoTranscodedBasePath = join(transcodeDirectory, type, video.uuid)
const videoTranscodedBasePath = join(transcodeDirectory, type)
await ensureDir(videoTranscodedBasePath)
const videoFilename = generateVideoStreamingPlaylistName(video.uuid, resolution)
@ -337,8 +337,6 @@ async function generateHlsPlaylistCommon (options: {
await move(playlistFileTranscodePath, playlistPath, { overwrite: true })
// Move video file
await move(join(videoTranscodedBasePath, videoFilename), videoFilePath, { overwrite: true })
// Cleanup directory
await remove(videoTranscodedBasePath)
const stats = await stat(videoFilePath)