Skip to content

Fix iOS silent audio-only output and Android Dolby Vision .MOV failures#2

Open
Copilot wants to merge 4 commits into
mainfrom
copilot/update-docs-and-squash-commits
Open

Fix iOS silent audio-only output and Android Dolby Vision .MOV failures#2
Copilot wants to merge 4 commits into
mainfrom
copilot/update-docs-and-squash-commits

Conversation

Copilot AI commented Jun 7, 2026

Copy link
Copy Markdown

Two video regressions: on iOS (since numandev1#392) Video.compress could resolve successfully with an MP4 containing only audio — the video track was silently dropped; on Android, iPhone Dolby Vision .MOV inputs failed hard with Failed to initialize video/dolby-vision, error 0xfffffffe (NAME_NOT_FOUND).

iOS — audio-only result (VideoMain.swift)

  • Removed AVVideoExpectedSourceFrameRateKey and AVVideoAverageNonDroppableFrameRateKey from the H.264 compressionDict. These aren't documented avc1 compression properties: AVAssetWriter.canApply(...) returns true, but the iOS encoder drops the video track while the export still ends as .completed.
  • Added a post-export guard that rejects results whose output asset has no video track, instead of returning an audio-only file as success.
let outputAsset = AVAsset(url: outputURL)
if outputAsset.tracks(withMediaType: .video).isEmpty {
  try? FileManager.default.removeItem(at: outputURL)
  onFailure(CompressionError(message: "Compression produced a file with no video track"))
} else {
  onCompletion(outputURL)
}

Android — Dolby Vision .MOV (CompressorUtils.kt, Compressor.kt)

  • The decoder is created from the input track MIME; video/dolby-vision has no decoder on most devices. New ensureDecodableVideoFormat(...) runs before createDecoderByType and, when the dedicated decoder is missing, remaps to the backward-compatible base layer (profiles 8.x/4 → HEVC, 9 → AVC; unknown → HEVC, the common iPhone case).
  • Non-backward-compatible profiles (5/7) now surface a clear error rather than a cryptic native crash.

Docs

  • TRIAGE.md: added rows + fix entries for both issues.
  • CLAUDE.md (new): repo layout, build/test commands, and native-pipeline pitfalls — including both failure modes above.

Notes

The native paths are verified by review only; per the repo's testing model the JS tests mock the native module, so real decode/encode should be smoke-tested in the example app on a simulator/device.

HuuNguyen312 and others added 2 commits June 8, 2026 02:45
… fixes (numandev1#399)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@XChikuX XChikuX marked this pull request as ready for review June 9, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants