SDAVAssetExportSession icon indicating copy to clipboard operation
SDAVAssetExportSession copied to clipboard

SDAVAssetExportSession takes a long time

Open scarlettSS opened this issue 7 years ago • 2 comments

SDAVAssetExportSession compress & export a video taken from photo library (about 300M)takes about 40s,but sysytem AVAssetExportSession takes only 20s..who can help me to find out? settings:

        QUINT64 bitrate = (naturalSize.width * naturalSize.height * 3); 
        NSDictionary *videoSettings = @{
                                        AVVideoCodecKey: AVVideoCodecH264,
                                        AVVideoWidthKey: CZ_NSNumber(naturalSize.width),
                                        AVVideoHeightKey: CZ_NSNumber(naturalSize.height),
                                        AVVideoCompressionPropertiesKey: @
                                            {
                                              AVVideoAverageBitRateKey: @(bitrate)
                                            }
                                        };
        exportSession.videoSettings = videoSettings;
        
        exportSession.audioSettings = @
        {
            AVFormatIDKey: CZ_NSNumber(kAudioFormatMPEG4AAC),
            AVNumberOfChannelsKey: CZ_NSNumber(1),
            AVSampleRateKey: @(44100),
            AVEncoderBitRateKey:  @(64000),
        };

scarlettSS avatar Mar 14 '17 08:03 scarlettSS

I have the same problem. Did you know about it?

balkarov avatar Nov 09 '17 18:11 balkarov

I am doing audio M4a recording using SDAVAssetExportSession but it takes a long time to export it same as AVAssetExportSession. I have seen no difference. Can someone point me in right direction ?

alirazamsp avatar Feb 26 '21 19:02 alirazamsp