[Ffmpeg-php-user] Slow frame search
Brought to you by:
tkirby
|
From: Alexey P. <pe...@gc...> - 2005-06-10 14:37:29
|
I've found, that frame search in ffmpeg-php works only by looking through all frames in the movie... It takes a lot of CPU time and disk I/O's to just catch 1 frame from the middle of typical movie (700 MB), which usual contain about 100'000 frames. The solution is: seek to the nearest keyframe (by movie's index) and start search for needed frame from that point. New function getNextKeyFrame() from CVS-version doesn't help in that situation, because uses full-search too... But I suppose, fast seek is already realised in FFMPEG library. PS: I write phpVideoBrowser, based on ffmpeg-php. Implemented features: - Browse files/dirs as on FTP server - View tech. info about movies - Catch random frames from movies (only from first 2000 frames because of the subject) Demo-site is here: http://alexey.homeftp.net:4080/browser/ (sorry, only russian interface yet, codepage CP1251 ;) Description of specific movie: ("Monsters Inc." extras: "Mike's New Car") http://alexey.homeftp.net:4080/browser/info.php?file=/%CC%F3%EB%FC%F2%F4%E8%EB%FC%EC%FB/%C7%E0%F0%F3%E1%E5%E6%ED%FB%E5/%CA%EE%F0%EF%EE%F0%E0%F6%E8%DF%20%CC%EE%ED%F1%F2%F0%EE%E2/extras/Mike%27s%20NewCar.avi -- Alexey Petrov |