Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Oup's

Chocobozzz28e51e831bd1
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index a53a7bae40..037bf703a4 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -118,13 +118,13 @@ function transcode (options: TranscodeOptions) {
return new Promise<void>(async (res, rej) => {
let fps = await getVideoFileFPS(options.inputPath)
// On small/medium resolutions, limit FPS
- // if (
- // options.resolution !== undefined &&
- // options.resolution < VIDEO_TRANSCODING_FPS.KEEP_ORIGIN_FPS_RESOLUTION_MIN &&
- // fps > VIDEO_TRANSCODING_FPS.AVERAGE
- // ) {
- // fps = VIDEO_TRANSCODING_FPS.AVERAGE
- // }
+ if (
+ options.resolution !== undefined &&
+ options.resolution < VIDEO_TRANSCODING_FPS.KEEP_ORIGIN_FPS_RESOLUTION_MIN &&
+ fps > VIDEO_TRANSCODING_FPS.AVERAGE
+ ) {
+ fps = VIDEO_TRANSCODING_FPS.AVERAGE
+ }
let command = ffmpeg(options.inputPath, { niceness: FFMPEG_NICE.TRANSCODING })
.output(options.outputPath)