1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add video aspect ratio in server

This commit is contained in:
Chocobozzz 2024-02-27 11:18:56 +01:00
parent c75381208f
commit b6b1aaa56f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
52 changed files with 345 additions and 237 deletions

View file

@ -12,6 +12,7 @@ import { getTranscodingJobPriority } from './transcoding/transcoding-priority.js
import { buildNewFile, removeHLSPlaylist, removeWebVideoFile } from './video-file.js'
import { VideoPathManager } from './video-path-manager.js'
import { buildStoryboardJobIfNeeded } from './video-jobs.js'
import { buildAspectRatio } from '@peertube/peertube-core-utils'
const lTags = loggerTagsFactory('video-studio')
@ -104,6 +105,7 @@ export async function onVideoStudioEnded (options: {
await newFile.save()
video.duration = await getVideoStreamDuration(outputPath)
video.aspectRatio = buildAspectRatio({ width: newFile.width, height: newFile.height })
await video.save()
return JobQueue.Instance.createSequentialJobFlow(