aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/upload.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/upload.ts')
-rw-r--r--server/controllers/api/videos/upload.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts
index fd90d9915..3c026ad1f 100644
--- a/server/controllers/api/videos/upload.ts
+++ b/server/controllers/api/videos/upload.ts
@@ -24,7 +24,7 @@ import { HttpStatusCode, VideoCreate, VideoResolution, VideoState } from '@share
24import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' 24import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger'
25import { retryTransactionWrapper } from '../../../helpers/database-utils' 25import { retryTransactionWrapper } from '../../../helpers/database-utils'
26import { createReqFiles } from '../../../helpers/express-utils' 26import { createReqFiles } from '../../../helpers/express-utils'
27import { ffprobePromise, getMetadataFromFile, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffprobe-utils' 27import { ffprobePromise, buildFileMetadata, getVideoStreamFPS, getVideoStreamDimensionsInfo } from '../../../helpers/ffmpeg'
28import { logger, loggerTagsFactory } from '../../../helpers/logger' 28import { logger, loggerTagsFactory } from '../../../helpers/logger'
29import { CONFIG } from '../../../initializers/config' 29import { CONFIG } from '../../../initializers/config'
30import { MIMETYPES } from '../../../initializers/constants' 30import { MIMETYPES } from '../../../initializers/constants'
@@ -246,7 +246,7 @@ async function buildNewFile (videoPhysicalFile: express.VideoUploadFile) {
246 extname: getLowercaseExtension(videoPhysicalFile.filename), 246 extname: getLowercaseExtension(videoPhysicalFile.filename),
247 size: videoPhysicalFile.size, 247 size: videoPhysicalFile.size,
248 videoStreamingPlaylistId: null, 248 videoStreamingPlaylistId: null,
249 metadata: await getMetadataFromFile(videoPhysicalFile.path) 249 metadata: await buildFileMetadata(videoPhysicalFile.path)
250 }) 250 })
251 251
252 const probe = await ffprobePromise(videoPhysicalFile.path) 252 const probe = await ffprobePromise(videoPhysicalFile.path)
@@ -254,8 +254,8 @@ async function buildNewFile (videoPhysicalFile: express.VideoUploadFile) {
254 if (await isAudioFile(videoPhysicalFile.path, probe)) { 254 if (await isAudioFile(videoPhysicalFile.path, probe)) {
255 videoFile.resolution = VideoResolution.H_NOVIDEO 255 videoFile.resolution = VideoResolution.H_NOVIDEO
256 } else { 256 } else {
257 videoFile.fps = await getVideoFileFPS(videoPhysicalFile.path, probe) 257 videoFile.fps = await getVideoStreamFPS(videoPhysicalFile.path, probe)
258 videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path, probe)).resolution 258 videoFile.resolution = (await getVideoStreamDimensionsInfo(videoPhysicalFile.path, probe)).resolution
259 } 259 }
260 260
261 videoFile.filename = generateWebTorrentVideoFilename(videoFile.resolution, videoFile.extname) 261 videoFile.filename = generateWebTorrentVideoFilename(videoFile.resolution, videoFile.extname)