1. Separate file formats are mov, mp4, m4a, 3gp, 3g2, mj2, etc.
2. The flow chart of separating video files is as follows:
3. File path encapsulation class
3.1 Header file, PathTool.h
#import "PathTool.h"
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface PathTool : NSObject
+(NSString *)bundlePath:(NSString *)fileName;
+(NSString *)documentsPath:(NSString *)fileName;
@end
NS_ASSUME_NONNULL_END
3.2 Implement the header file, PathTool.m
#import "PathTool.h"
@implementation PathTool
/// 应用里资源文件路径
/// - Parameter fileName: 文件名称
+ (NSString *)bundlePath:(NSString *)fileName{
//[[NSBundle mainBundle]pathForResource:@"test.h264" ofType:nil];
return [[[NSBundle mainBundle] bundlePath] stringByAppendin