mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Fix resolution for portrait videos
This commit is contained in:
parent
6fdc553adb
commit
056aa7f2b4
5 changed files with 27 additions and 19 deletions
|
@ -3,7 +3,7 @@ import { extname, join } from 'path'
|
|||
import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared'
|
||||
import { renamePromise } from '../../../helpers/core-utils'
|
||||
import { retryTransactionWrapper } from '../../../helpers/database-utils'
|
||||
import { getVideoFileHeight } from '../../../helpers/ffmpeg-utils'
|
||||
import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
|
||||
import { processImage } from '../../../helpers/image-utils'
|
||||
import { logger } from '../../../helpers/logger'
|
||||
import { createReqFiles, getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils'
|
||||
|
@ -187,11 +187,11 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
|
|||
const video = new VideoModel(videoData)
|
||||
video.url = getVideoActivityPubUrl(video)
|
||||
|
||||
const videoFileHeight = await getVideoFileHeight(videoPhysicalFile.path)
|
||||
const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path)
|
||||
|
||||
const videoFileData = {
|
||||
extname: extname(videoPhysicalFile.filename),
|
||||
resolution: videoFileHeight,
|
||||
resolution: videoFileResolution,
|
||||
size: videoPhysicalFile.size
|
||||
}
|
||||
const videoFile = new VideoFileModel(videoFileData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue