"Problem appending pixel buffer at time" with latest commit running armv7s on iPhone 5s
I got the "Problem appending pixel buffer at time" runtime error, first using the v0.1 build via Cocoapods. I saw other bug reports that claimed this issue was fixed in a more recent build, so I tried it with the latest commit (adf85c2324739b480928bab8ee4b5221739ecb65), and continued seeing the error with that build, perhaps even more frequently. Finally I tried a build from about 3 months ago (68d930a9abdfa6808b73ffbf88c58d68cb29142b) ~~and found that it fixed the issue.~~ (EDIT: See comment below.) So, it appears the code that reintroduced this issue was added within the last 3 months.
I didn't see this error when testing on my iPhone 4s using the Cocoapods v0.1 build. I only started seeing it when I started testing on my new iPhone 5s using an armv7s build. (I'm not running an arm64 build because I'm stuck using a closed-source static library that doesn't have a 64-bit version.)
It's also worth noting that I'm re-encoding a video file with no audio. I saw comments on other bugs that pointed to audio encoding as the source of the bug. That's apparently not the case here. Here's my code:
- (void)resizeVideoToSquareSize
{
dispatch_async(dispatch_get_main_queue(), ^{
self.movieFile = [[GPUImageMovie alloc] initWithURL:[NSURL fileURLWithPath:_pathToMovie]];
unlink([_pathToComposition UTF8String]);
self.movieRewriter = [[GPUImageMovieWriter alloc] initWithMovieURL:[NSURL fileURLWithPath:_pathToComposition]
size:CGSizeMake(kOutputVideoWidth, kOutputVideoWidth)
fileType:AVFileTypeAppleM4V
outputSettings:[self videoOutputSettings]];
[_movieFile addTarget:_movieRewriter];
_movieRewriter.hasAudioTrack = NO;
_movieRewriter.encodingLiveVideo = NO;
[_movieFile enableSynchronizedEncodingUsingMovieWriter:_movieRewriter];
NSLog(@"Encoding started...");
[_movieRewriter startRecording];
[_movieFile startProcessing];
_movieRewriter.completionBlock = [self compositionSuccessBlock];
_movieRewriter.failureBlock = [self compositionFailureBlock];
});
}
With the latest commit, it looks like I'm getting the error on every frame after about 2 seconds. Here are the first few errors from my console log:
Encoding started...
2013-10-15 14:21:08.969 DoSomething[719:3b03] Problem appending pixel buffer at time: {1241/600 = 2.068}
2013-10-15 14:21:08.973 DoSomething[719:3b03] Problem appending pixel buffer at time: {1261/600 = 2.102}
2013-10-15 14:21:08.977 DoSomething[719:3b03] Problem appending pixel buffer at time: {1281/600 = 2.135}
Correction: The first time I tried commit 68d930a9abdfa6808b73ffbf88c58d68cb29142b from 3 months ago it appeared to work, but now I'm seeing the same behavior I first saw with v0.1. This behavior is a bit different than what I get with the latest commit in the following way:
The latest commit outputs an error message for every frame after about 2 seconds, as described above. Commit 68d930a9abdfa6808b73ffbf88c58d68cb29142b outputs only a single error as follows:
2013-10-15 16:55:21:445 DoSomething[854:1547] Encoding started...
2013-10-15 16:55:21.835 DoSomething[854:7007] Problem appending pixel buffer at time: 1241
Again, this older commit just outputs this single error. The latest commit outputs one error per frame.
The NSLog output format changed a bit between these two builds, but it's perhaps noteworthy that in both cases the first error occurs at a CMTimeValue of 1241, despite the fact that these two test runs used two different .m4v recordings.
Unfortunately the behavior is intermittent. For the moment the older commit and even the v0.1 Cocoapods build appear to have started working properly again, with no error messages.
Each time I run this, it's processing a freshly recorded video taken from the camera. That may account for the intermittent behavior. Perhaps there's some particular timing that screws it up.
Interesting. The intermittent behavior also seems to apply to the latest commit. I just went back to the latest commit, and it's now working too. If I manage to replicate it again, I'll try to export a copy of the temporary video file to see if I can reliably replicate the bug when the video file doesn't change.
cduhn did you manage to find a solution to this issue. I am seeing the same problem, getting "Problem appending pixel buffer at time : xx" for every frame after about 2 seconds?
Same here!
Seeing this issue too, but it's also somewhat intermittent so it's hard to pin down under exactly what circumstances it happens. Disabling audio passthrough doesn't seem to make a difference.