diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-29 16:41:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-29 17:10:54 +0200 |
commit | 3a6f351b255d21ec42578632600ba699885f350e (patch) | |
tree | fdc770f5f59a87a929a5c85da9aed783e9676097 /server/controllers/api/videos/index.ts | |
parent | 34b19192901b0f872c72ce8d94a69aeba51d1c29 (diff) | |
download | PeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.gz PeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.zst PeerTube-3a6f351b255d21ec42578632600ba699885f350e.zip |
Handle higher FPS for high resolution (test)
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 7 |
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' | |||
2 | import { extname, join } from 'path' | 2 | import { extname, join } from 'path' |
3 | import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared' | 3 | import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared' |
4 | import { renamePromise } from '../../../helpers/core-utils' | 4 | import { renamePromise } from '../../../helpers/core-utils' |
5 | import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' | 5 | import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils' |
6 | import { processImage } from '../../../helpers/image-utils' | 6 | import { processImage } from '../../../helpers/image-utils' |
7 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
8 | import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' | 8 | import { 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 | ||