speed up android signficantly

This commit is contained in:
Samuel Newman
2026-03-11 14:27:22 +02:00
parent 097dca154a
commit 7dee4ac1e1
8 changed files with 581 additions and 249 deletions
@@ -357,13 +357,8 @@ class VideoCompressor {
let mediaSubType = CMFormatDescriptionGetMediaSubType(formatDesc)
// Only passthrough AAC audio
guard mediaSubType == kAudioFormatMPEG4AAC else {
return false
}
// Check bitrate - passthrough if <= 128kbps
let estimatedDataRate = try await audioTrack.load(.estimatedDataRate)
return estimatedDataRate <= 128_000
// Always passthrough AAC regardless of bitrate — the server re-encodes
// everything anyway, and the bitrate difference is negligible.
return mediaSubType == kAudioFormatMPEG4AAC
}
}