From 3a6f351b255d21ec42578632600ba699885f350e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Jun 2018 16:41:29 +0200 Subject: Handle higher FPS for high resolution (test) --- server/controllers/api/videos/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index b4ced8c1e..8c93ae89c 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts @@ -2,7 +2,7 @@ import * as express from 'express' import { extname, join } from 'path' import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared' import { renamePromise } from '../../../helpers/core-utils' -import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' +import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils' import { processImage } from '../../../helpers/image-utils' import { logger } from '../../../helpers/logger' import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' @@ -184,10 +184,13 @@ async function addVideo (req: express.Request, res: express.Response) { // Build the file object const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path) + const fps = await getVideoFileFPS(videoPhysicalFile.path) + const videoFileData = { extname: extname(videoPhysicalFile.filename), resolution: videoFileResolution, - size: videoPhysicalFile.size + size: videoPhysicalFile.size, + fps } const videoFile = new VideoFileModel(videoFileData) -- cgit v1.2.3