locked
determine GOP size of video RRS feed

  • Question

  • Hi,

    I want to determine if a video has a GOP size bigger than 1. Which attribute can I use for this purpose? Using the sourceReader API, I get the IMFMediaType object for the video stream of my MPEG-4 or AVI video file. I have tested a H.264 video and a DV video.

    Both IMFMediaType attributes "MF_MT_ALL_SAMPLES_INDEPENDENT" and "MF_MT_MAX_KEYFRAME_SPACING" are not available. Are these attributes only used for the encoder stuff? 

    HRESULT hr = mediaType->GetUINT32 (MF_MT_ALL_SAMPLES_INDEPENDENT, &independent);

    hr = mediaType->GetUINT32 (MF_MT_SAMPLE_SIZE, &sampleSize);

    hr = mediaType->GetUINT32(MF_MT_MAX_KEYFRAME_SPACING, &spacing);

    best regards

    saoirse


    • Edited by saoirse Thursday, August 6, 2015 8:01 AM add further information
    Thursday, August 6, 2015 7:50 AM