SDAVAssetExportSession
SDAVAssetExportSession copied to clipboard
AVAssetExportSession drop-in replacement with customizable audio&video settings
SPM is a great dependencies manager that works out of box. Luckily we can have pure Objective-C / C/C++ packages. I have also added swift example to Readme and Makefile...
From `SDAVAssetExportSession.h`, ```objc /** * The settings used for encoding the audio track. * * A value of nil specifies that appended output should not be re-encoded. * The dictionary’s...
I've converted this to a Swift version. If there's any interest I'm happy to contribute...?
hello, does any one know if this module handles the new variable frame rate slo-mo vids from apple?
` let session: SDAVAssetExportSession = SDAVAssetExportSession(asset: composition) session.audioSettings = [AVFormatIDKey:kAudioFormatMPEG4AAC,AVNumberOfChannelsKey:2,AVSampleRateKey:44100,AVEncoderBitRateKey:128000] previouslySavedDuration = startAudioTime session.outputURL = url session.outputFileType = AVFileType.m4a.rawValue session.exportAsynchronously(completionHandler:{ DispatchQueue.main.async(execute: { switch session.status{ case .failed: print("failed \(String(describing: session.error))") completion(false)...
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...
func sdvExport(_ videoURL: URL) { let avAsset1 = AVURLAsset(url: videoURL, options: nil) print("AVURLAsset1 ",avAsset1) let avAsset = AVURLAsset(url: ((videoURL as NSURL) as URL), options: nil) print("AVURLAsset2 ",avAsset) let startDate =...
I am processing this video: ``` NSURL *inputUrl = [NSURL fileURLWithPath:inputPath]; AVURLAsset *inputUrlAsset = [AVURLAsset assetWithURL:inputUrl]; NSURL *outputUrl = [NSURL fileURLWithPath:outputPath]; SDAVAssetExportSession *encoder = [SDAVAssetExportSession.alloc initWithAsset:inputUrlAsset]; encoder.outputFileType = AVFileTypeMPEG4; encoder.outputURL...
All is well.