|
@@ -428,13 +428,15 @@ extension PQStuckPointPublicController {
|
|
|
|
|
|
var orgeBitRate = (editProjectModel?.sData?.videoMetaData?.videoWidth ?? 0) * (editProjectModel?.sData?.videoMetaData?.videoHeight ?? 0) * 3
|
|
|
|
|
|
- for stick in mStickers! {
|
|
|
- if stick.type == StickerType.VIDEO.rawValue {
|
|
|
- let asset = AVURLAsset(url: URL(fileURLWithPath: documensDirectory + stick.locationPath), options: avAssertOptions)
|
|
|
-
|
|
|
- let cbr = asset.tracks(withMediaType: .video).first?.estimatedDataRate
|
|
|
- if Int(cbr ?? 0) > orgeBitRate {
|
|
|
- orgeBitRate = Int(cbr ?? 0)
|
|
|
+ if(mStickers != nil){
|
|
|
+ for stick in mStickers! {
|
|
|
+ if stick.type == StickerType.VIDEO.rawValue {
|
|
|
+ let asset = AVURLAsset(url: URL(fileURLWithPath: documensDirectory + stick.locationPath), options: avAssertOptions)
|
|
|
+
|
|
|
+ let cbr = asset.tracks(withMediaType: .video).first?.estimatedDataRate
|
|
|
+ if Int(cbr ?? 0) > orgeBitRate {
|
|
|
+ orgeBitRate = Int(cbr ?? 0)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -455,7 +457,8 @@ extension PQStuckPointPublicController {
|
|
|
}
|
|
|
}
|
|
|
exporter.completion = { [weak self] url in
|
|
|
- BFLog(message: "导了完成: \(url)")
|
|
|
+ BFLog(message: "MovieOutput total frames appended:导了完成: \(url) 生成视频时长为:\(CMTimeGetSeconds(AVAsset.init(url: url).duration))")
|
|
|
+
|
|
|
// 导出完成后取消导出
|
|
|
if self?.exporter != nil {
|
|
|
self?.exporter.cancel()
|