BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.22k stars 4.61k forks source link

PlayAtActualSpeed Problem on filtering an existing video while playing #1979

Open wangwu1981 opened 9 years ago

wangwu1981 commented 9 years ago

Hi,

First of all, many thanks Brad Larson for providing this great library. I am developing a iOS media sharing app which has the video effects using GPUImage. Everything have been working well, but I found a problem in filtering an existing video file while playing. I set playAtActualSpeed=Yes and started filtering but playback duration in the app was not accurately same as actual video duration. Playback duration was different a little every time. For example, if the duration of a video file is 10.0s and playback time is about 11s. I want the playback duration will be 10.0s. I wrote my code as below:

movieFile = [[GPUImageMovie alloc] initWithURL:mVideoUrl];
filter = [[GPUImageBrightnessFilter alloc] init];
[movieFile addTarget:filter];
[filter addTarget:self.filterView];
[movieFile setPlayAtActualSpeed:YES];
[movieFile startProcessing];

I tested it with SimpleVideoFileFilter project but the same problem was occurred. Are there any ideas to solve this problem?

Thanks, WangWu

barbayrak commented 4 years ago

Did you come up anything on this ? I am facing the same problem @wangwu1981