|
@@ -86,6 +86,7 @@ public class PQCompositionExporter {
|
|
|
|
|
|
let audioTrack = asset.tracks(withMediaType: AVMediaType.audio).first
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -122,20 +123,32 @@ public class PQCompositionExporter {
|
|
|
print("Couldn't process movie with error: \(error)")
|
|
|
}
|
|
|
BFLog(message: "export mShowVidoSize is \(String(describing: input?.mShowVidoSize))")
|
|
|
-
|
|
|
- var videoEncodingSettings: [String: Any] = ["":""]
|
|
|
- if #available(iOS 11.0, *) {
|
|
|
- videoEncodingSettings = [
|
|
|
- AVVideoCompressionPropertiesKey: [
|
|
|
- AVVideoExpectedSourceFrameRateKey: 30,
|
|
|
- AVVideoAverageBitRateKey: (videoAverageBitRate / 2) == 0 ? Int(input?.mShowVidoSize.width ?? 0) * Int(input?.mShowVidoSize.height ?? 0) : videoAverageBitRate,
|
|
|
-
|
|
|
-
|
|
|
- ],
|
|
|
-
|
|
|
- AVVideoCodecKey: AVVideoCodecHEVC,
|
|
|
- ]
|
|
|
- }
|
|
|
+
|
|
|
+ let videoEncodingSettings: [String: Any] = [
|
|
|
+ AVVideoCompressionPropertiesKey: [
|
|
|
+ AVVideoExpectedSourceFrameRateKey: 30,
|
|
|
+ AVVideoAverageBitRateKey: videoAverageBitRate == 0 ? Int(input?.mShowVidoSize.width ?? 0) * Int(input?.mShowVidoSize.height ?? 0) * 2 : videoAverageBitRate,
|
|
|
+ AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel,
|
|
|
+ AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC,
|
|
|
+ ],
|
|
|
+
|
|
|
+ AVVideoCodecKey: AVVideoCodecH264,
|
|
|
+ ]
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|