Hello,
I have an application using IMFSampleGrabberSinkCallback to grab video frames. It works great for wmv, h.264 in .mp4 etc. But I found one file it just can't decode, and it's of type MFVideoFormat_MP4V (in mp4 container). The same multimedia file works in MF samples using the standard sink, e.g. "MFPlayer2". To make sure it wasn't just my code I downloaded this example which has the same problem: msdn.microsoft.com/en-us/library/windows/desktop/hh184779(v=vs.85).aspx
What happens is that the topology and session are successfully created, and no events I receive indicate any errors. I just don't get any callbacks to IMFSampleGrabberSinkCallback::OnProcessSample(). I even used MFTrace.exe to see if I could get any internal errors, but I don't see anything out of the ordinary. It's quite noisy however, so I could be missing something.
The only restriction on IMFSampleGrabberSinkCallback I can find from the docs is that it doesn't support protected content. But the PKEY_DRM_IsProtected field is 0, which means it's not protected right? The streams that work has the same value of this propery, so that shouldn't be it.
Does anyone know what's going on?
Below is the output of MFMediaPropDump on the file:
Container attributes:MF_PD_DURATION: 0h 1m 16.0s
MF_PD_TOTAL_FILE_SIZE: 3834322
Media content has 1 stream(s)
Stream #0 attributes:
MF_SD_LANGUAGE: en
Stream #0 has 1 media type(s)
Media type #0:
MF_MT_MAJOR_TYPE: MFMediaType_Video
MF_MT_SUBTYPE: MFVideoFormat_MP4V
MF_MT_FRAME_SIZE: 354x94
MF_MT_USER_DATA:
0x00, 0x00, 0x01, 0xB0, 0xF3, 0x00, 0x00, 0x01, 0xB5, 0x0E,
0xE0, 0x40, 0xC0, 0xCF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x20, 0x00, 0x84, 0x40, 0xFA, 0x28, 0x58, 0xA0, 0x5E,
0xA3, 0x1F
MF_MT_FRAME_RATE: 24.00000fps
MF_MT_PIXEL_ASPECT_RATIO: 1:1
MF_MT_INTERLACE_MODE: MFVideoInterlace_Progressive
MF_MT_AM_FORMAT_TYPE: FORMAT_VideoInfo2
MF_MT_SAMPLE_SIZE: 1
MF_MT_MPEG4_SAMPLE_DESCRIPTION:
0x00, 0x00, 0x00, 0xBF, 0x73, 0x74, 0x73, 0x64, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xAF,
0x6D, 0x70, 0x34, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x61, 0x70, 0x70, 0x6C,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x62,
0x00, 0x5E, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x4D, 0x50, 0x45,
0x47, 0x2D, 0x34, 0x20, 0x56, 0x69, 0x64, 0x65, 0x6F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x45, 0x65, 0x73, 0x64, 0x73,
0x00, 0x00, 0x00, 0x00, 0x03, 0x37, 0x00, 0x00, 0x1F, 0x04,
0x2F, 0x20, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x01, 0xB0,
0xF3, 0x00, 0x00, 0x01, 0xB5, 0x0E, 0xE0, 0x40, 0xC0, 0xCF,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x84,
0x40, 0xFA, 0x28, 0x58, 0xA0, 0x5E, 0xA3, 0x1F, 0x06, 0x01,
0x02, 0x00, 0x00, 0x00, 0x10, 0x70, 0x61, 0x73, 0x70, 0x00,
0x00, 0x01, 0x62, 0x00, 0x00, 0x01, 0x62, 0x00, 0x00, 0x00,
0x00
MF_MT_MPEG4_CURRENT_SAMPLE_ENTRY: 0
MF_MT_AVG_BITRATE: 399734
Shell Metadata:
PKEY_Media_Duration: 0h 1m 16.0s
PKEY_Video_EncodingBitrate: 399728
PKEY_Video_FrameWidth: 354
PKEY_Video_FrameHeight: 94
PKEY_Video_FrameRate: 24000
PKEY_Video_Compression: MFVideoFormat_MP4V
PKEY_Video_FourCC: MP4V
PKEY_Video_HorizontalAspectRatio: 1
PKEY_Video_VerticalAspectRatio: 1
PKEY_Video_StreamNumber: 1
PKEY_Video_TotalBitrate: 399728
PKEY_DRM_IsProtected: 0