BSMediaExporter 1.2.1

BSMediaExporter 1.2.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2015

Maintained by Bogdan Stasjuk.



 
Depends on:
BSMacros>= 0
BSAudioFileHelper>= 0
NSFileManager+Helper>= 0
 

Class for exporting and converting media files. It was tested for M4A input and MPEG4AAC or LinearPCM output. Also LinearPCM output can be converted to MP3 if you'll add LAME.framework to your project.

Properties

@property (copy, nonatomic) void (^success)(NSURL *exportedURL);
@property (copy, nonatomic) void (^failure)(NSError *error);
@property (assign, readonly, nonatomic) CGFloat progress;

Methods

+ (NSURL *)outputURLForAVFileType:(NSString *)avFileType error:(NSError *)error;
- (void)exportAsset:(AVAsset *)asset toAudioFormat:(AudioFormatID)audioFormatID;
- (void)exportAssetToMP3:(AVAsset *)asset;

Project uses next pods:

pod 'BSMacros'
pod 'BSAudioFileHelper'
pod 'NSFileManager+Helper'

Compatibility

This class has been tested back to iOS 7.0.

Installation

Cocoapods: pod 'BSMediaExporter'
Manual: Copy the BSMediaExporter folder in your project

Import header in your project.

#import "BSMediaExporter.h"

License

This code is released under the MIT License. See the LICENSE file for details.