estimatedOutputFileLength
のプロパティがAVAssetExportSession
常に0を返す (シミュレータでは-9223372036854775808を返す)問題があります。
私はこれを機能させるためにあらゆることを試しました。さまざまなoutputFileType
s を試し、shouldOptimizeForNetworkUse
オンとオフを切り替え、指定 (または指定なし) しましたoutputURL
... これらすべてにもかかわらず、何も機能していないようで、これはバグである可能性があると考え始めています。 SDKで。
これは私のコードです:
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetMediumQuality]; // doesn't matter which preset is used
//exportSession.shouldOptimizeForNetworkUse = YES;
exportSession.outputFileType = AVFileTypeQuickTimeMovie;
NSLog(@"bytes = %lld", exportSession.estimatedOutputFileLength);
これが機能しない理由がわかりません!(iOS6、iPhone5)