Fix broken audio with transcoding
This commit is contained in:
parent
44848a51dc
commit
64e3e27053
1 changed files with 3 additions and 3 deletions
|
@ -328,10 +328,10 @@ async function presetH264 (command: ffmpeg.FfmpegCommand, resolution: VideoResol
|
||||||
const audioCodecName = parsedAudio.audioStream[ 'codec_name' ]
|
const audioCodecName = parsedAudio.audioStream[ 'codec_name' ]
|
||||||
let bitrate: number
|
let bitrate: number
|
||||||
if (audio.bitrate[ audioCodecName ]) {
|
if (audio.bitrate[ audioCodecName ]) {
|
||||||
bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
|
localCommand = localCommand.audioCodec('aac')
|
||||||
|
|
||||||
if (bitrate === -1) localCommand = localCommand.audioCodec('copy')
|
bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
|
||||||
else if (bitrate !== undefined) localCommand = localCommand.audioBitrate(bitrate)
|
if (bitrate !== undefined && bitrate !== -1) localCommand = localCommand.audioBitrate(bitrate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue