+ // 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 = _audio.audioStream['codec_name']
+ let bitrate: number
+ if (audio.bitrate[audioCodecName]) {
+ bitrate = audio.bitrate[audioCodecName](_audio.audioStream['bit_rate'])
+
+ if (bitrate === -1) return localFfmpeg.audioCodec('copy')
+ }
+
+ if (bitrate !== undefined) return localFfmpeg.audioBitrate(bitrate)
+
+ return localFfmpeg