Accurate frame seeking in MPEG video clips
Deprecated
Kept for reference only.
Deprecated
This feature is deprecated and kept for reference only.
Accurate frame seeking in MPEG video clips
The MPEG compressed video clips are made of full frames (key frames) and delta frames.
The number of delta frames between each key frame depend on the key frame spacing of the video clip.
When assigning the PlayerFramePosition property or moving the trackbar with a compressed video clip, the real position reached will correspond to the nearest key frame, that may be different of the real delta frame expected.
To be able to seek accurately any position (including delta frames) the compressed clip must be treated as an uncompressed video clip.
TVideoGrabber is able to handle video clips this way through AVISynth.
Proceed as follows:
-
download and install AVISynth from http://sourceforge.net/projects/avisynth2/
-
before invoking OpenPlayer (), set PlayerForcedCodec = "AVS", this will tell TVideoGrabber to play the clip by using AVISynth.
-
then setting the PlayerFramePosition will accurately set the position of clip to the corresponding frame.
E.g to open the clip by using AVISynth:
VideoGrabber.PlayerFileName = "myvideoclip.avi"
VideoGrabber.PlayerForcedCodec = "AVS"
VideoGrabber.OpenPlayer()
...