Unable to read video file

Hello,
I have a new installation installation of open cv 4.5.1 on windows, downloaded it built from sourceforge. Im able to read images, but for some reason I'm unable to open any video. Thats what I get: cv::CvCapture_Images::open CAP_IMAGES: Stop scanning. Can’t read image file: c:/ttt.mp4


Im pasting the code here, its basic, so I dont think theres an issue with it.

#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include
#include <sys/stat.h>
#include
#include

using namespace cv;
using namespace std;

void main() {

string path = "c:/ttt.mp4";
struct stat buffer;
bool exist = stat(path.c_str(), &buffer) == 0;
if (exist)
{
	VideoCapture cap(path);
	Mat img;

	while (true) {

		cap.read(img);
		imshow("Image", img);
		waitKey(20);
	}
}

}

please replace the screenshot of the errors with a TEXT version, thank you.

[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\videoio_registry.cpp (197) cv::`anonymous-namespace’::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (396) cv::impl::getPluginCandidates Found 3 plugin(s) for FFMPEG
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load C:\OpenCv\opencv\build\x64\vc15\bin\opencv_videoio_ffmpeg451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg451_64.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (396) cv::impl::getPluginCandidates Found 2 plugin(s) for GSTREAMER
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load C:\OpenCv\opencv\build\x64\vc15\bin\opencv_videoio_gstreamer451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load opencv_videoio_gstreamer451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (396) cv::impl::getPluginCandidates Found 2 plugin(s) for INTEL_MFX
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load C:\OpenCv\opencv\build\x64\vc15\bin\opencv_videoio_intel_mfx451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load opencv_videoio_intel_mfx451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (396) cv::impl::getPluginCandidates Found 2 plugin(s) for MSMF
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load C:\OpenCv\opencv\build\x64\vc15\bin\opencv_videoio_msmf451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (175) cv::impl::DynamicLib::libraryLoad load opencv_videoio_msmf451_64d.dll => FAILED
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp (282) cv::icvExtractPattern Pattern: c:/ttt.mp%01d @ 4
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp (313) cv::CvCapture_Images::open CAP_IMAGES: Stop scanning. Can’t read image file: c:/ttt.mp4

What I find intersting is that I dont have this file: opencv_videoio_ffmpeg451_64d.dll Took me a while to actually spot the D. I only have opencv_videoio_ffmpeg451_64, so I tried to rename it, but Im getting the same error…

Found the issue. Took me around 6h( :pleading_face:) to figure out that Windows 10 Pro N was missing some media functionalities. After installing the needed stuff, everything works like a charm. Check this link if you stumble upon the same issue: Media Feature Pack for Windows 10 N (October 2020)

This is why the exact OS should be reported… Windows 10 N lacks those things by design.