Skip to content

inputdrv_videoframesvssamples

shekh edited this page Apr 15, 2018 · 1 revision

VirtualDub Plugin SDK 1.2

Video frames vs. samples

A video stream consists of video samples, which consist of raw data; these are then converted to frames by the video decoder. In most cases these are synonymous, but when complex frame relations are present — notably bidirectional prediction — the two may need to be different.

It is required that frames be mapped 1:1 to samples and that frame numbers be contiguous starting at zero. A video stream with 500 frames thus has frames numbered from 0 to 499, inclusive. It is also required that samples map 1:1 to frames and also be numbered starting at zero, so the samples will also be numbered 0 to 499, inclusive. However, the samples don't have to have the same order; the GetFrameNumberForSample() and GetSampleNumberForFrame() methods allow for mapping between the two. This allows the samples to be ordered in decoding order instead of presentation order for convenience.


Copyright (C) 2007-2012 Avery Lee.

Clone this wiki locally