aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r--server/helpers/ffmpeg-utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 8936005e0..7c45f3632 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -1,11 +1,11 @@
1import * as ffmpeg from 'fluent-ffmpeg' 1import * as ffmpeg from 'fluent-ffmpeg'
2import { join } from 'path' 2import { join } from 'path'
3import { VideoResolution } from '../../shared/models/videos' 3import { VideoResolution } from '../../shared/models/videos'
4import { CONFIG, VIDEO_TRANSCODING_FPS, FFMPEG_NICE } from '../initializers' 4import { CONFIG, FFMPEG_NICE, VIDEO_TRANSCODING_FPS } from '../initializers'
5import { unlinkPromise } from './core-utils'
6import { processImage } from './image-utils' 5import { processImage } from './image-utils'
7import { logger } from './logger' 6import { logger } from './logger'
8import { checkFFmpegEncoders } from '../initializers/checker' 7import { checkFFmpegEncoders } from '../initializers/checker'
8import { remove } from 'fs-extra'
9 9
10function computeResolutionsToTranscode (videoFileHeight: number) { 10function computeResolutionsToTranscode (videoFileHeight: number) {
11 const resolutionsEnabled: number[] = [] 11 const resolutionsEnabled: number[] = []
@@ -90,7 +90,7 @@ async function generateImageFromVideoFile (fromPath: string, folder: string, ima
90 logger.error('Cannot generate image from video %s.', fromPath, { err }) 90 logger.error('Cannot generate image from video %s.', fromPath, { err })
91 91
92 try { 92 try {
93 await unlinkPromise(pendingImagePath) 93 await remove(pendingImagePath)
94 } catch (err) { 94 } catch (err) {
95 logger.debug('Cannot remove pending image path after generation error.', { err }) 95 logger.debug('Cannot remove pending image path after generation error.', { err })
96 } 96 }