1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +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

@ -29,8 +29,11 @@ async function buildNewFile (options: {
if (await isAudioFile(path, probe)) {
videoFile.resolution = VideoResolution.H_NOVIDEO
} else {
const dimensions = await getVideoStreamDimensionsInfo(path, probe)
videoFile.fps = await getVideoStreamFPS(path, probe)
videoFile.resolution = (await getVideoStreamDimensionsInfo(path, probe)).resolution
videoFile.resolution = dimensions.resolution
videoFile.width = dimensions.width
videoFile.height = dimensions.height
}
videoFile.filename = mode === 'web-video'