-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
VideoTrimmer with .mov has wrong size #410
Comments
@boboxiaodd, indeed. This seems to happen on iCloud videos on my side. I'm going to rollback into git to see when this has been introduced. |
Rolling back doesn't help. the bug is there as well. After testing it seems to happen on videos whose extension AVAssetTrack {
var mediaFormat: String {
var format = ""
let descriptions = self.formatDescriptions as! [CMFormatDescription]
for (index, formatDesc) in descriptions.enumerated() {
// Get String representation of media type (vide, soun, sbtl, etc.)
let type =
CMFormatDescriptionGetMediaType(formatDesc).toString()
// Get String representation media subtype (avc1, aac, tx3g, etc.)
let subType =
CMFormatDescriptionGetMediaSubType(formatDesc).toString()
// Format string as type/subType
format += "\(type)/\(subType)"
// Comma separate if more than one format description
if index < descriptions.count - 1 {
format += ","
}
}
return format
}
}
extension FourCharCode {
// Create a String representation of a FourCC
func toString() -> String {
let bytes: [CChar] = [
CChar((self >> 24) & 0xff),
CChar((self >> 16) & 0xff),
CChar((self >> 8) & 0xff),
CChar(self & 0xff),
0
]
let result = String(cString: bytes)
let characterSet = CharacterSet.whitespaces
return result.trimmingCharacters(in: characterSet)
}
} |
Somehow this only happens on iOS 13 on my side, not 0n iOS 12.
|
@s4cha Did you find out where is the issue and how to fix this? |
I have the same issue And this happen to me on iOS 12 and 13. Any solutions? Thanks |
Well, I just found the fix after 2 days of extensive search... 🥂 |
Hi @s4cha, I added the code line and now it is working!!! Thank you very much! |
@rodribech20 Thanks a ton for confirming the fix on you end. I will let you know when it's live :) |
good job! |
Describe the bug
when select a video with .mov type, VideoTrimmer has black area
select an mp4 file ,it's correct
Screenshots
Environment (please complete the following information):
Installation Type
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: