X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffprobe-utils.ts;h=adb459ed39042b67e13c0f8b8af8a0e9fb6b1bd4;hb=3b01f4c0ac764ecb70efaadfd939ca868c28769c;hp=1cf397767e807a2ce06947ecdca5b793524afeb3;hpb=884d2c39ae23b44d0d037aaff0f66ad9ae0807ba;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts index 1cf397767..adb459ed3 100644 --- a/server/helpers/ffprobe-utils.ts +++ b/server/helpers/ffprobe-utils.ts @@ -164,7 +164,7 @@ async function getVideoFileBitrate (path: string, existingProbe?: ffmpeg.Ffprobe async function getDurationFromVideoFile (path: string, existingProbe?: ffmpeg.FfprobeData) { const metadata = await getMetadataFromFile(path, existingProbe) - return Math.floor(metadata.format.duration) + return Math.round(metadata.format.duration) } async function getVideoStreamFromFile (path: string, existingProbe?: ffmpeg.FfprobeData) { @@ -188,6 +188,7 @@ function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' VideoResolution.H_720P, VideoResolution.H_240P, VideoResolution.H_1080P, + VideoResolution.H_1440P, VideoResolution.H_4K ]