processing 2.0 video new API
probably, as i can guess, it's goes from underlayng ffmpeg which also can't jump to exact frame. probably, accurate jump it's not so necessary, but there's should be the way to get needed frame!
i think video should have another api. with more low-level methods exposed. something like this:
- videoStream video = new videoStream();
- video.open("bla.mov"); // returns True if all ok
- //simple iteration (maybe it's better to have iterator througth frames?)
- PImage frame0 = video.decodeFrameAndStep();
- //and
- video.stepFrame();
- video.stepFrame();
- PImage frame3 = video.decodeFrameAndStep();
- // as i can assume such internal logic should know last I-frame and do decode from it.
- // maybe, even frametype can be public
- println(video.frame + ": " + video.frameType);
- // and for jump, if it's not accurate there sould be a way to get needed frame
- video.jump(toSomeTime);
- while(video.frame>frameWeNeed)
- video.stepToPreviosIntra();
- while(video.frame<frameWeNeed)
- video.stepFrame();
- Pimage frameWeNeedImg = video.decodeFrameAndStep(); // or decodeFrame();
but anyway, will be great to have more low-level control over video:
such as stepToNextIntra(), stepToPreviosIntra() for fast video rewind
some iteration thougth frames for fast every frame processing
and so on...
LET'S DISCUSS WHAT WE NEED, BUGGY JUMP() IS NOT ENOUGHT!