From: Anton Latukha Date: Mon, 9 Jul 2018 22:27:59 +0000 (+0300) Subject: (ffmpeg) B-adapt 1 and B-frames 16 (#774) X-Git-Tag: v1.0.0-beta.10.pre.1~88 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=602a81a2137afcb5ca12341329199fbea2f08bd8;p=github%2FChocobozzz%2FPeerTube.git (ffmpeg) B-adapt 1 and B-frames 16 (#774) --- diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 4086335d7..f0623c88b 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -88,6 +88,8 @@ function transcode (options: TranscodeOptions) { .videoCodec('libx264') .outputOption('-threads ' + CONFIG.TRANSCODING.THREADS) .outputOption('-movflags faststart') + .outputOption('-b_strategy 1') // NOTE: b-strategy 1 - heuristic algorythm, 16 is optimal B-frames for it + .outputOption('-bf 16') // NOTE: Why 16: https://github.com/Chocobozzz/PeerTube/pull/774. b-strategy 2 -> B-frames<16 // .outputOption('-crf 18') let fps = await getVideoFileFPS(options.inputPath)