You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've now managed to reproduce the issue by running an iOS app in a simulator like iPhone XS and then running xcrun simctl io booted recordVideo simulator-recording.mp4 in the terminal, and then pressing Ctrl+C some seconds later to end the recording.
And here's the debug output when dragging it into Gifski:
## AVAsset debug info ##
Extension: mp4
Video codec: H264 (avc1)
Audio codec: nil
Duration: 7s
Dimension: 0×0
Frame rate: 14.99
File size: 3.7 MB
Is readable: true
Is playable: true
Is exportable: true
Has protected content: false
Track #1
----
Type: Video
Codec: H264 (avc1)
Duration: 7s
Dimensions: 0×0
Natural size: (1125.0, 0.03717041015625)
Frame rate: 14.99
Is playable: true
Is decodable: true
----
(macOS 10.14.4)
Notice Natural size, which is the AVAssetTrack#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 is CGSize.zero.
Yes it does. Not sure wether the bug is in reading in AVAssetTrack or in writing it in the first place (I guess via AVAssetExportSession when the video is recorded).
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: