mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix broken audio with transcoding
This commit is contained in:
@@ -328,10 +328,10 @@ async function presetH264 (command: ffmpeg.FfmpegCommand, resolution: VideoResol
|
||||
const audioCodecName = parsedAudio.audioStream[ 'codec_name' ]
|
||||
let bitrate: number
|
||||
if (audio.bitrate[ audioCodecName ]) {
|
||||
bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
|
||||
localCommand = localCommand.audioCodec('aac')
|
||||
|
||||
if (bitrate === -1) localCommand = localCommand.audioCodec('copy')
|
||||
else if (bitrate !== undefined) localCommand = localCommand.audioBitrate(bitrate)
|
||||
bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
|
||||
if (bitrate !== undefined && bitrate !== -1) localCommand = localCommand.audioBitrate(bitrate)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user