[Ffmpeg-devel] question: problem by seeking and counting video frames
Mon Nov 27 20:40:04 CET 2006
I'm now developing a video tool for reserch purpose using lavf and lavc (prebuilt ver. 7070 shared). Firstly I called av_read_frame and store all timestamps and keyframe-flags from the packet. And then I called av_seek_frame + av_read_frame + avcodec_decode_video and buffered all pictures between two keyframes (well ... I guess it is a GOP).
However I didn't have the result I expected. The keyframe-flag doesn't indicate the I-frames of MPEG-2 Videos (though I have set the LOW_DELAY for the codec). And if I set hurry_up, I'll get the wrong frame_number.
So the question is, is there any general way or what people usually do to set up a track bar and an error-free seeking function?
More information about the ffmpeg-devel