aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg-utils.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-10-08 21:13:13 +0200
committerRigel Kent <sendmemail@rigelk.eu>2018-10-08 21:14:21 +0200
commite1d7b98bc762bf3a5e6590f827f67187713fb27e (patch)
treee86240d800bb4e2f417b77524bec1fd517e7f550 /server/helpers/ffmpeg-utils.ts
parentc1c86c1599acf8aad71fb7d7f312c43d6d1fa5ac (diff)
downloadPeerTube-e1d7b98bc762bf3a5e6590f827f67187713fb27e.tar.gz
PeerTube-e1d7b98bc762bf3a5e6590f827f67187713fb27e.tar.zst
PeerTube-e1d7b98bc762bf3a5e6590f827f67187713fb27e.zip
fix automatic bitrate adjustment
The regression was introduced in edb4ffc7e0b13659d7c73b120f2c87b27e4c26a1 and forced a fixed bitrate per resolution
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r--server/helpers/ffmpeg-utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 8e4471173..a964abdd4 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -152,7 +152,7 @@ function transcode (options: TranscodeOptions) {
152 // https://slhck.info/video/2017/03/01/rate-control.html 152 // https://slhck.info/video/2017/03/01/rate-control.html
153 // https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate 153 // https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate
154 const targetBitrate = getTargetBitrate(options.resolution, fps, VIDEO_TRANSCODING_FPS) 154 const targetBitrate = getTargetBitrate(options.resolution, fps, VIDEO_TRANSCODING_FPS)
155 command.outputOptions([`-b:v ${ targetBitrate }`, `-maxrate ${ targetBitrate }`, `-bufsize ${ targetBitrate * 2 }`]) 155 command.outputOptions([`-maxrate ${ targetBitrate }`, `-bufsize ${ targetBitrate * 2 }`])
156 156
157 command 157 command
158 .on('error', (err, stdout, stderr) => { 158 .on('error', (err, stdout, stderr) => {