GPUImage +视频录制过程中的大量音频噪音

时间:2013-05-19 13:03:54

标签: iphone ios video avfoundation gpuimage

我正在使用GPUImage Framework录制视频并且一切都很顺利但是在播放录制的视频时,我会收到很多背景噪音。

如何删除或减少/消除此背景噪音?请帮我减少它。 m4v formate中的视频商店。

我的代码如下:

 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");
    });
});

由于

0 个答案:

没有答案