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
Copy file name to clipboardExpand all lines: Gifski/VideoValidator.swift
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@ struct VideoValidator {
94
94
return.failure
95
95
}
96
96
97
+
letcannotReadVideoExplanation="This could happen if the video is corrupt or the codec profile level is not supported. macOS unfortunately doesn't provide Gifski a reason for why the video could not be decoded. Try re-exporting using a different configuration or try converting the video to HEVC (MP4) with the free HandBrake app."
98
+
97
99
// We already specify the UTIs we support, so this can only happen on invalid video files or unsupported codecs.
98
100
guard asset.isVideoDecodable else{
99
101
if
@@ -103,7 +105,7 @@ struct VideoValidator {
103
105
NSAlert.showModalAndReportToCrashlytics(
104
106
for: window,
105
107
title:"The video could not be decoded even though its codec “\(codec)” is supported.",
106
-
message:"This could happen if the video is corrupt or the codec profile level is not supported. macOS unfortunately doesn't provide Gifski a reason for why the video could not be decoded. Try re-exporting using a different configuration or try converting the video to HEVC (MP4) with the free HandBrake app.",
108
+
message:cannotReadVideoExplanation,
107
109
showDebugInfo:false,
108
110
debugInfo: asset.debugInfo
109
111
)
@@ -132,10 +134,21 @@ struct VideoValidator {
132
134
return.failure
133
135
}
134
136
135
-
NSAlert.showModalAndReportToCrashlytics(
137
+
NSAlert.showModal(
136
138
for: window,
137
139
title:"The video codec “\(codecTitle)” is not supported.",
138
-
message:"Re-export or convert the video to a supported format. For the best possible quality, export to ProRes 4444 XQ (supports alpha). Alternatively, use the free HandBrake app to convert the video to HEVC (MP4).",
140
+
message:"Re-export or convert the video to a supported format. For the best possible quality, export to ProRes 4444 XQ (supports alpha). Alternatively, use the free HandBrake app to convert the video to HEVC (MP4)."
141
+
)
142
+
143
+
return.failure
144
+
}
145
+
146
+
// AVFoundation reports some videos as `.isReadable == true` even though they are not. We detect this through missing codec info. See "Fixture 211". (macOS 13.1)
0 commit comments