Open jaskiratSeraphic opened 7 years ago
Please tell me about how can i add the filter on already recorded video. Seems, I found the steps to resolve the issue in GPUImage documentation but it unable to resolve my problem.
`movieFile = [[GPUImageMovie alloc] initWithURL:sampleURL]; pixellateFilter = [[GPUImagePixellateFilter alloc] init];
[movieFile addTarget:pixellateFilter];
NSString pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.m4v"]; unlink([pathToMovie UTF8String]); NSURL movieURL = [NSURL fileURLWithPath:pathToMovie];
movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(480.0, 640.0)]; [pixellateFilter addTarget:movieWriter];
movieWriter.shouldPassthroughAudio = YES; movieFile.audioEncodingTarget = movieWriter; [movieFile enableSynchronizedEncodingUsingMovieWriter:movieWriter];
[movieWriter startRecording]; [movieFile startProcessing];
[pixellateFilter removeTarget:movieWriter]; [movieWriter finishRecording];`
It save the Zero byte video in my document directory. Please tell me the Answer Thanks,
Please tell me about how can i add the filter on already recorded video. Seems, I found the steps to resolve the issue in GPUImage documentation but it unable to resolve my problem.
`movieFile = [[GPUImageMovie alloc] initWithURL:sampleURL]; pixellateFilter = [[GPUImagePixellateFilter alloc] init];
[movieFile addTarget:pixellateFilter];
NSString pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.m4v"]; unlink([pathToMovie UTF8String]); NSURL movieURL = [NSURL fileURLWithPath:pathToMovie];
movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(480.0, 640.0)]; [pixellateFilter addTarget:movieWriter];
movieWriter.shouldPassthroughAudio = YES; movieFile.audioEncodingTarget = movieWriter; [movieFile enableSynchronizedEncodingUsingMovieWriter:movieWriter];
[movieWriter startRecording]; [movieFile startProcessing];
[pixellateFilter removeTarget:movieWriter]; [movieWriter finishRecording];`
It save the Zero byte video in my document directory. Please tell me the Answer Thanks,