Ask Your Question

Revision history [back]

Video Playback via Microsoft Media Foundation (msmf)

Hi!

Have anyone successfully playbacked video using Media Foundation (CV_CAP_MSMF) of VideoCapture on Windows 10? My goal is to use only media foundation and remove ffmpeg dependency for video decoding.

ex:

    VideoCapture cap(fileName, CV_CAP_MSMF);

By rebuilding from source of OpenCV 3.0, 3.1, 3.2 (-with_msmf), I always get cap.isOpen() to return false.

When digging into the cap_msmf.cpp source, in line 3864, my multiple video(s) can not match this particular MFVideoFormat_RGB24. It makes me wonder if there is a limitation of OpenCV's media foundation implementation.

    MediaType MT = FormatReader::Read(pType.Get());
    // We can capture only RGB video.
    if( MT.MF_MT_SUBTYPE == MFVideoFormat_RGB24 )

I had spent couple days on investigating this issue, and hope to get some confirmation and experience shared from this forum. Thanks a lot!

-Jay

Video Playback via Microsoft Media Foundation (msmf)

Hi!

Have anyone successfully playbacked video using Media Foundation (CV_CAP_MSMF) of VideoCapture on Windows 10? My goal is to use only media foundation and remove ffmpeg dependency for video decoding.

ex:

    VideoCapture cap(fileName, CV_CAP_MSMF);

By rebuilding from source of OpenCV 3.0, 3.1, 3.2 (-with_msmf), I always get cap.isOpen() cap.isOpened() to return false.

When digging into the cap_msmf.cpp source, in line 3864, my multiple video(s) can not match this particular MFVideoFormat_RGB24. It makes me wonder if there is a limitation of OpenCV's media foundation implementation.

    MediaType MT = FormatReader::Read(pType.Get());
    // We can capture only RGB video.
    if( MT.MF_MT_SUBTYPE == MFVideoFormat_RGB24 )

I had spent couple days on investigating this issue, and hope to get some confirmation and experience shared from this forum. Thanks a lot!

-Jay