Skip to content

Fix iOS playback error for certain Android-compressed videos #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

MoZhouqi
Copy link
Contributor

@MoZhouqi MoZhouqi commented Mar 7, 2025

Description

This PR fixes an iOS playback error that occurs when playing certain videos compressed by the Android app. The AAC decoder on iOS fails with errors such as maxSFB long exceeds maximum allowed value due to incorrect audio channel settings.

Root Cause

The issue was caused by the AudioSampleEntry.setup() method, which forced mono audio (1 channel) to be treated as stereo (2 channels). This resulted in incorrect audio format information that iOS couldn't decode properly.

Solution

Fixed by preserving the original audio channel count during compression.

Testing

Verified that the fix resolves playback errors on iOS for affected videos.

Related Issue

Fixes #268.

@numandev1 numandev1 merged commit 5e0585f into numandev1:main Mar 7, 2025
@numandev1
Copy link
Owner

released in 1.10.5

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.

Some compressed videos on Android are not playable on macOS or iOS
2 participants