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
Incorrect dimensions for video recorded from iOS Simulator #76
Comments
I was about to mention that workaround (tested it in a small macOS sample app and it works) but you were faster 🙂 Glad I could help to reproduce it. |
@florianbuerger Does it look like an AVFoundation bug to you too? I'm considering whether I should open a Radar about this. |
Yes it does. Not sure wether the bug is in reading in |
I've seen this issue in Crashlytics, but couldn't reproduce until I got this reply: https://twitter.com/FlorianBuerger/status/1124945762729779200
I've now managed to reproduce the issue by running an iOS app in a simulator like
iPhone XS
and then runningxcrun simctl io booted recordVideo simulator-recording.mp4
in the terminal, and then pressing Ctrl+C some seconds later to end the recording.Here's a test file: ios-simulator-recording-incorrect-dimensions-fixture.mp4.zip
And here's the debug output when dragging it into Gifski:
(macOS 10.14.4)
Notice
Natural size
, which is theAVAssetTrack#naturalSize
property, and should be the dimensions, but the height is not the correct value. After applying the.preferredTransform
, like you're supposed to, the end result isCGSize.zero
.You can try it for yourself in the
debug-dimensions-issue
branch.The dimensions are supposed to be 1125x2436. QuickTime shows the correct dimensions. So does the MediaInfo app.
I have no idea why the height is so screwed up. Seems to me that this is a AVFoundation bug, unless I'm missing something?
The text was updated successfully, but these errors were encountered: