New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPUImageMovieWriter changes exposure and white balance #1313

Open
MarcAnthonyPhotography opened this Issue Nov 22, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@MarcAnthonyPhotography

I saw a previous thread had the same issue but I wanted to see if there are any ideas. I have an app where I take a sequence of photos then an option to record a message pops up. I have my exposure locked but when I go to record a video it unlocks and it doesn't go back to the original state when I am done recording. I moved
self.stillCamera.audioEncodingTarget = self.movieWriter; to ViewDidLoad like a previous thread said to do. This fixed the exposure issue but now there is no audio. I am stumped.

Here's some of the code.
{
(void)viewDidLoad {
[super viewDidLoad];
self.library = [[ALAssetsLibrary alloc] init];
takephotocolor.hidden = YES;
takephotobw.hidden = YES;
self.stillCamera.audioEncodingTarget = self.movieWriter;

}

(IBAction)StartButtonPressed:(id)sender {
if(!self.transform){

    self.transform = [[GPUImageTransformFilter alloc] init];
    CATransform3D perspectiveTransform = CATransform3DScale(CATransform3DMakeRotation(0, 0, 0, 1),
                                                            -1, 1, 1);
    [self.transform setTransform3D:perspectiveTransform];
}

[self.filter addTarget:self.transform];

self.pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/movie.mov"];
unlink([self.pathToMovie UTF8String]);
NSURL *movieURL = [NSURL fileURLWithPath:self.pathToMovie];
self.movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(1024.0, 768.0)];


[self.transform addTarget:self.movieWriter];
[self.movieWriter startRecording];

btnStart.hidden = YES;
btnStop.hidden = NO;
NSLog(@"START RECORDING");

}

(IBAction)StopButtonPressed:(id)sender {
self.stillCamera.audioEncodingTarget = nil;
[self.movieWriter finishRecording];

[self.filter removeTarget:self.transform];
[self.transform removeAllTargets];
UISaveVideoAtPathToSavedPhotosAlbum(self.pathToMovie, self, nil, nil);

    [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(goVideo) userInfo:nil repeats:NO];
}

}

@tuo

This comment has been minimized.

Show comment
Hide comment
@tuo

tuo Jan 3, 2014

It is a problem introduced by other committer by accident. I found and verified you can try revert this commit (Re-working GPUImageVideoCamera to use the YUV->RGB transform method s…) 2ad3e9c .

After reverted and merged, over exposure problem is gone.

tuo commented Jan 3, 2014

It is a problem introduced by other committer by accident. I found and verified you can try revert this commit (Re-working GPUImageVideoCamera to use the YUV->RGB transform method s…) 2ad3e9c .

After reverted and merged, over exposure problem is gone.

@xboxp

This comment has been minimized.

Show comment
Hide comment
@xboxp

xboxp Jan 7, 2015

I still have this issue with latest code. Is this bug fixed?

xboxp commented Jan 7, 2015

I still have this issue with latest code. Is this bug fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment