Sunset Lake Software - Comments for "How can I apply GPUImageMultiplyBlendFilter or GPUImageOverlayBlendFilter to a movie file?" http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file Comments for "How can I apply GPUImageMultiplyBlendFilter or GPUImageOverlayBlendFilter to a movie file?" en Hey sigurdasson, were you http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1444 <p>Hey sigurdasson, were you able to figure this out? ive been trying for a few days now and i either get a black screen or the original video depending on how i apply the filter targets.</p> <p>Brad, if you could help us out this would be greatly appreciated. My code is similar to what sigurdasson has posted above.</p> <p>Thanks</p> pubDate Mon, 11 Jun 2012 21:30:53 +0000 dc:creator jalleyne guid false comment 1444 at http://www.sunsetlakesoftware.com Ok Brad, but I still can't http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1439 <p>Ok Brad, but I still can't apply a filter to a movie file. The output movie file is a movie with a black screen.<br /> Here's the code:<br /> <div class="geshifilter"><pre class="geshifilter-cocoa">- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissModalViewControllerAnimated:YES]; NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; &nbsp; if ([mediaType isEqualToString:@&quot;public.movie&quot;]){ NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL]; &nbsp; movieFile = [[GPUImageMovie alloc] initWithURL:videoURL]; movieFile.runBenchmark = YES; overlayFilter = [[GPUImageOverlayBlendFilter alloc] init]; &nbsp; UIImage *overlayImage = [UIImage imageNamed:@&quot;overlay.png&quot;]; overlayPicture = [[GPUImagePicture alloc] initWithImage:overlayImage smoothlyScaleOutput:YES]; [overlayPicture addTarget:overlayFilter]; [overlayPicture processImage]; &nbsp; [movieFile addTarget:overlayFilter]; &nbsp; NSString *pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@&quot;Documents/Movie.m4v&quot;]; unlink([pathToMovie UTF8String]); NSURL *movieURL = [NSURL fileURLWithPath:pathToMovie]; &nbsp; movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(640.0, 480.0)]; [overlayFilter addTarget:movieWriter]; &nbsp; movieWriter.shouldPassthroughAudio = YES; movieFile.audioEncodingTarget = movieWriter; [movieFile enableSynchronizedEncodingUsingMovieWriter:movieWriter]; &nbsp; [movieWriter startRecording]; [movieFile startProcessing]; &nbsp; [movieWriter setCompletionBlock:^{ [overlayFilter removeTarget:movieWriter]; [movieWriter finishRecording]; if ( UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(pathToMovie)) { UISaveVideoAtPathToSavedPhotosAlbum(pathToMovie, nil, NULL, NULL); } }]; } }</pre></div></p> pubDate Mon, 04 Jun 2012 15:49:37 +0000 dc:creator sigurdasson guid false comment 1439 at http://www.sunsetlakesoftware.com The smoothlyScaleOutput: http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1428 <p>The smoothlyScaleOutput: option for a photo tells the framework to use trilinear filtering when downsampling the photo. That is, for large photos that you're shrinking down, it will produce a much smoother output. If you don't need to shrink a photo, you can turn that off for better performance and a slightly sharper picture.</p> pubDate Fri, 01 Jun 2012 15:19:15 +0000 dc:creator Brad Larson guid false comment 1428 at http://www.sunsetlakesoftware.com How can I interpret this line http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1427 <p>How can I interpret this line of code: smoothlyScaleOutput:YES ?</p> pubDate Fri, 01 Jun 2012 03:56:51 +0000 dc:creator sigurdasson guid false comment 1427 at http://www.sunsetlakesoftware.com Yes, the rest of the code http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1418 <p>Yes, the rest of the code comes from another topic: <a href="http://www.sunsetlakesoftware.com/forum/load-movie-filtering-save-camera-roll" title="http://www.sunsetlakesoftware.com/forum/load-movie-filtering-save-camera-roll" rel="nofollow">http://www.sunsetlakesoftware.com/forum/load-movie-filtering-save-camera...</a></p> pubDate Wed, 30 May 2012 06:03:43 +0000 dc:creator sigurdasson guid false comment 1418 at http://www.sunsetlakesoftware.com Do you start playing the http://www.sunsetlakesoftware.com/forum/how-can-i-apply-gpuimagemultiplyblendfilter-or-gpuimageoverlayblendfilter-movie-file#comment-1417 <p>Do you start playing the movie at some point using [movieFile startProcessing];?</p> pubDate Tue, 29 May 2012 21:12:57 +0000 dc:creator Brad Larson guid false comment 1417 at http://www.sunsetlakesoftware.com