aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-11 17:48:14 +0100
committerChocobozzz <me@florianbigard.com>2018-12-11 17:48:14 +0100
commit64e3e27053a5881fa9efca32f5a0debace617ced (patch)
tree495b963d209f4dcb4162fb68f15ef22a1f722c61 /server
parent44848a51dc239ccb55046bb5f422f03bba26d57b (diff)
downloadPeerTube-64e3e27053a5881fa9efca32f5a0debace617ced.tar.gz
PeerTube-64e3e27053a5881fa9efca32f5a0debace617ced.tar.zst
PeerTube-64e3e27053a5881fa9efca32f5a0debace617ced.zip
Fix broken audio with transcoding
Diffstat (limited to 'server')
-rw-r--r--server/helpers/ffmpeg-utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index b59e7e40e..0caa86efc 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -328,10 +328,10 @@ async function presetH264 (command: ffmpeg.FfmpegCommand, resolution: VideoResol
328 const audioCodecName = parsedAudio.audioStream[ 'codec_name' ] 328 const audioCodecName = parsedAudio.audioStream[ 'codec_name' ]
329 let bitrate: number 329 let bitrate: number
330 if (audio.bitrate[ audioCodecName ]) { 330 if (audio.bitrate[ audioCodecName ]) {
331 bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ]) 331 localCommand = localCommand.audioCodec('aac')
332 332
333 if (bitrate === -1) localCommand = localCommand.audioCodec('copy') 333 bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
334 else if (bitrate !== undefined) localCommand = localCommand.audioBitrate(bitrate) 334 if (bitrate !== undefined && bitrate !== -1) localCommand = localCommand.audioBitrate(bitrate)
335 } 335 }
336 } 336 }
337 337