Problems with my own video
I have a sequence of image I convert to a video with Apple compressor using the iOS device template. I'm able to play the resulting video with finder without any problem. When I try to play the video with GPUImage it is completely deformed, I can see just diagonal lines.
Can you suggest me the right format/the best tool I can use to create the video from a PNG image sequence?
I solved this problem. Ass suggested here http://stackoverflow.com/questions/7620490/playing-video-on-ios-using-opengl-es I changed the line
int bufferWidth = CVPixelBufferGetWidth(movieFrame);
in GPUImageMovie.m / processMovieFrame with
int bufferWidth = CVPixelBufferGetBytesPerRow(movieFrame) / 4;
In this way both my own video and the sample video are played well.
Just a little update. The problem appeared only on the simulator. On real devices the original code works perfectly.
Interesting. I saw something similar to this with certain camera frame sizes when taking photos with the texture caches, so I can see why the above might fix it. I assume this replaces the matching line in GPUImageMovie, correct?
If so, I'll change that code for the next commit.
Yes it is correct. Anyway as I wrote, the problem is actually only on the simulator. On actual device your original code works fine (and mine does not work). So the best it is maybe to use an
#if TARGET_IPHONE_SIMULATOR
to use one line of code or the other.
That's odd. It might be a bug in the Simulator then. I'll add the conditional compilation check for that. What version of the Simulator did you see this under?
Yes really strange. Both with 5.1 included in XCode 4.4.1 and 6.0 included in XCode 4.5 beta 4. I thought that could be encoding problem but I use Apple Compressor with iOS devices template. Video exported for example from flash does not have the problem.