我正在使用 GPUImage 框架录制视频,一切都做得很好,但是在播放录制的视频时,我得到了很多背景噪音。
我怎样才能消除或减少/消除这种背景噪音?请帮我减少它。m4v 格式的视频存储。
我的代码如下:
if(!self.movieWriter)
{
self.movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(320.0, 480.0)];
}
[filter addTarget:movieWriter];
double delayToStartRecording = 0.5;
dispatch_time_t startTime = dispatch_time(DISPATCH_TIME_NOW, delayToStartRecording * NSEC_PER_SEC);
dispatch_after(startTime, dispatch_get_main_queue(), ^(void){
NSLog(@"Start recording");
videoCamera.audioEncodingTarget = movieWriter;
[movieWriter startRecording];
double delayInSeconds = 60.0;
dispatch_time_t stopTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(stopTime, dispatch_get_main_queue(), ^(void){
[filter removeTarget:movieWriter];
videoCamera.audioEncodingTarget = nil;
[movieWriter finishRecording];
NSLog(@"Movie completed");
});
});
谢谢