| 
														
															@@ -53,7 +53,7 @@ public class PQCompositionExporter { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    public func prepare(videoSize: CGSize) -> Bool { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public func prepare(videoSize: CGSize,videoAverageBitRate:Int = 0) -> Bool { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         guard !FileManager.default.fileExists(atPath: exportURL.absoluteString) else { 
														 | 
														
														 | 
														
															         guard !FileManager.default.fileExists(atPath: exportURL.absoluteString) else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             return false 
														 | 
														
														 | 
														
															             return false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -96,11 +96,11 @@ public class PQCompositionExporter { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             print("Couldn't process movie with error: \(error)") 
														 | 
														
														 | 
														
															             print("Couldn't process movie with error: \(error)") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         BFLog(message: "export mShowVidoSize is \(String(describing: input?.mShowVidoSize))") 
														 | 
														
														 | 
														
															         BFLog(message: "export mShowVidoSize is \(String(describing: input?.mShowVidoSize))") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+     
														 | 
													
												
											
												
													
														| 
														 | 
														
															         let videoEncodingSettings: [String: Any] = [ 
														 | 
														
														 | 
														
															         let videoEncodingSettings: [String: Any] = [ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             AVVideoCompressionPropertiesKey: [ 
														 | 
														
														 | 
														
															             AVVideoCompressionPropertiesKey: [ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 AVVideoExpectedSourceFrameRateKey: 30, 
														 | 
														
														 | 
														
															                 AVVideoExpectedSourceFrameRateKey: 30, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                AVVideoAverageBitRateKey: (input?.mShowVidoSize.width ?? 0) * (input?.mShowVidoSize.height ?? 0) * 4, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                AVVideoAverageBitRateKey: videoAverageBitRate == 0 ? Int(input?.mShowVidoSize.width ?? 0) * Int(input?.mShowVidoSize.height ?? 0) * 2 : videoAverageBitRate, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel, 
														 | 
														
														 | 
														
															                 AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC, 
														 | 
														
														 | 
														
															                 AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             ], 
														 | 
														
														 | 
														
															             ], 
														 |