+ } else {
+ // we try to reduce the ceiling bitrate by making rough correspondances of bitrates
+ // of course this is far from perfect, but it might save some space in the end
+ const audioCodecName = parsedAudio.audioStream[ 'codec_name' ]
+ let bitrate: number
+ if (audio.bitrate[ audioCodecName ]) {
+ localCommand = localCommand.audioCodec('aac')
+
+ bitrate = audio.bitrate[ audioCodecName ](parsedAudio.audioStream[ 'bit_rate' ])
+ if (bitrate !== undefined && bitrate !== -1) localCommand = localCommand.audioBitrate(bitrate)
+ }