Skip to content

Commit

Permalink
Fix: B-adapt 1 should use B-frames 16
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Latukha committed Jul 6, 2018
1 parent c9e96ea commit c56cd52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/helpers/ffmpeg-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ function transcode (options: TranscodeOptions) {
.videoCodec('libx264')
.outputOption('-threads ' + CONFIG.TRANSCODING.THREADS)
.outputOption('-movflags faststart')
.outputOption('-b_strategy 1') /** NOTE: '-b-adapt 1' aka '-b_strategy 1' uses algorythm with logarithmic convergence to the number of B-frames, so usage of B-frames less then 16 only restricts the bit/quality of compression. Creator of '-b-adapt 2': https://forum.doom9.org/showthread.php?t=139827 */
.outputOption('-bf 16') //** NOTE: Use B-frames <= 16 on '-b_strategy 2'
// .outputOption('-crf 18')

let fps = await getVideoFileFPS(options.inputPath)
Expand Down

0 comments on commit c56cd52

Please sign in to comment.