导出VideoAsset后:
问题:
尝试去:
一些说明:
AVURLAsset*videoAsset = [[AVURLAsset alloc]initWithURL:url options:nil];
AVMutableComposition* mixComposition = [AVMixerBase compositionVideoTrackAssetUrl:videoAsset];
AVMutableVideoComposition *videoComposition=[AVMutableVideoComposition videoComposition];
videoComposition.frameDuration=CMTimeMake(1, 30); //frames per seconds
videoComposition.renderSize = videoAsset.naturalSize;
//videoComposition.renderScale = 1.0;
videoComposition.animationTool = [AVVideoCompositionCoreAnimationTool videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:videoLayer inLayer:parentLayer];
AVMutableCompositionTrack *videoTrack = [[mixComposition tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0]; //was AVAssetTrack *videoTrack
AVMutableVideoCompositionLayerInstruction *layerInstruction = [self layerInstructionAfterFixingOrientationForAsset:videoAsset
forTrack:videoTrack atTime:videoAsset.duration];
AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack];
[layerInstruction setTransform:videoTrack.preferredTransform atTime:kCMTimeZero];
[layerInstruction setOpacity:0.0 atTime:videoAsset.duration];
AVMutableVideoCompositionInstruction *instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction]; …Run Code Online (Sandbox Code Playgroud) 从“opencv2.framework”中获取错误。只是一个包含“opencv2.framework”的新项目没有运行。
我的步骤:
我错过了什么吗?
#ifndef PrefixHeader_pch
#define PrefixHeader_pch
#import <Availability.h>
#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#endif /* PrefixHeader_pch */
Run Code Online (Sandbox Code Playgroud)