aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 16:41:29 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 17:10:54 +0200
commit3a6f351b255d21ec42578632600ba699885f350e (patch)
treefdc770f5f59a87a929a5c85da9aed783e9676097 /server/controllers
parent34b19192901b0f872c72ce8d94a69aeba51d1c29 (diff)
downloadPeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.gz
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.zst
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.zip
Handle higher FPS for high resolution (test)
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/index.ts7
1 files changed, 5 insertions, 2 deletions
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'
2import { extname, join } from 'path' 2import { extname, join } from 'path'
3import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared' 3import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared'
4import { renamePromise } from '../../../helpers/core-utils' 4import { renamePromise } from '../../../helpers/core-utils'
5import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' 5import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
6import { processImage } from '../../../helpers/image-utils' 6import { processImage } from '../../../helpers/image-utils'
7import { logger } from '../../../helpers/logger' 7import { logger } from '../../../helpers/logger'
8import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' 8import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils'
@@ -184,10 +184,13 @@ async function addVideo (req: express.Request, res: express.Response) {
184 184
185 // Build the file object 185 // Build the file object
186 const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path) 186 const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path)
187 const fps = await getVideoFileFPS(videoPhysicalFile.path)
188
187 const videoFileData = { 189 const videoFileData = {
188 extname: extname(videoPhysicalFile.filename), 190 extname: extname(videoPhysicalFile.filename),
189 resolution: videoFileResolution, 191 resolution: videoFileResolution,
190 size: videoPhysicalFile.size 192 size: videoPhysicalFile.size,
193 fps
191 } 194 }
192 const videoFile = new VideoFileModel(videoFileData) 195 const videoFile = new VideoFileModel(videoFileData)
193 196