Key frame

25 views
Skip to first unread message

Emilie Montredon

unread,
May 28, 2010, 12:20:44 PM5/28/10
to webm-d...@webmproject.org
Hi,

I use the directShow filters, and I would like to know if the encoded frame is a key frame or not.
How can I do this ? Is it sufficient to check that the first byte is 0 ?

Thanks.

Matthew Heaney

unread,
May 28, 2010, 1:25:04 PM5/28/10
to Emilie Montredon, webm-d...@webmproject.org
On Fri, May 28, 2010 at 12:20 PM, Emilie Montredon <asuk...@yahoo.fr> wrote:

> I use the directShow filters, and I would like to know if the encoded frame
> is a key frame or not.

This information is part of the media sample pushed downstream.

> How can I do this ? Is it sufficient to check that the first byte is 0 ?

Call IMediaSample::IsSyncPoint.

-Matt

Apoorv Pandey

unread,
May 28, 2010, 1:55:38 PM5/28/10
to webm-d...@webmproject.org
Hello ,
As far as my understanding goes, the first bit tells weather it is a key frame.

regards,
apoorv

Matthew Heaney

unread,
May 28, 2010, 2:02:56 PM5/28/10
to Apoorv Pandey, webm-d...@webmproject.org
On Fri, May 28, 2010 at 1:55 PM, Apoorv Pandey <apoorv...@gmail.com> wrote:
> Hello ,
> As far as my understanding goes, the first bit tells weather it is a key
> frame.

I'm not intimately familiar with the VP8 bitstream (you could ask on
the codec dev list), but in practice, you shouldn't depend on the
format of the bitstream anyway.

What are you trying to do, that the IMediaSample interface does not
provide? Why is calling IMediaSample::IsSyncPoint not adequate?

Suman Sunkara

unread,
May 28, 2010, 2:13:47 PM5/28/10
to Matthew Heaney, Apoorv Pandey, webm-d...@webmproject.org
The uncompressed data chunk at the start of each frame and the first part of the first data partition contains information pertaining to the frame as a whole. The uncompressed data chunk comprises a common (for key frames and interframes) 3-byte frame tag in which the first bit indicates the frame type (0 for key frames and 1 for interframes). For key frames the uncompressed data chunk is followed by a further 7 bytes of uncompressed data.

Please refer to chapter 9 of  VP8 Data Format and Decoding Specification for further details.

Suman
Reply all
Reply to author
Forward
0 new messages