diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/video-transcoding.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts index 0fe0ff12a..05afb44d1 100644 --- a/server/lib/video-transcoding.ts +++ b/server/lib/video-transcoding.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants' | 1 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER, VIDEO_TRANSCODING_FPS } from '../initializers/constants' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { getVideoFileFPS, transcode } from '../helpers/ffmpeg-utils' | 3 | import { getVideoFileFPS, transcode, canDoQuickTranscode } from '../helpers/ffmpeg-utils' |
4 | import { ensureDir, move, remove, stat } from 'fs-extra' | 4 | import { ensureDir, move, remove, stat } from 'fs-extra' |
5 | import { logger } from '../helpers/logger' | 5 | import { logger } from '../helpers/logger' |
6 | import { VideoResolution } from '../../shared/models/videos' | 6 | import { VideoResolution } from '../../shared/models/videos' |
@@ -19,10 +19,13 @@ async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFi | |||
19 | const videoInputPath = join(videosDirectory, video.getVideoFilename(inputVideoFile)) | 19 | const videoInputPath = join(videosDirectory, video.getVideoFilename(inputVideoFile)) |
20 | const videoTranscodedPath = join(videosDirectory, video.id + '-transcoded' + newExtname) | 20 | const videoTranscodedPath = join(videosDirectory, video.id + '-transcoded' + newExtname) |
21 | 21 | ||
22 | const doQuickTranscode = await(canDoQuickTranscode(videoInputPath)) | ||
23 | |||
22 | const transcodeOptions = { | 24 | const transcodeOptions = { |
23 | inputPath: videoInputPath, | 25 | inputPath: videoInputPath, |
24 | outputPath: videoTranscodedPath, | 26 | outputPath: videoTranscodedPath, |
25 | resolution: inputVideoFile.resolution | 27 | resolution: inputVideoFile.resolution, |
28 | doQuickTranscode | ||
26 | } | 29 | } |
27 | 30 | ||
28 | // Could be very long! | 31 | // Could be very long! |