The code is simple like this:
cv::VideoWriter writer;
cout<<writer.open("./test001.avi",cv::CAP_FFMPEG,-1,25.0, frame.size(),1)<<endl;
I've tried different codecs and 0 (said to be for uncompressed), none of them worked and returned false. Then I tried -1 for codec select hoping a manu would appear but still nothing.
Then I think this may relate to a missing ffmpeg DLL file. I copied the file "opencv_videoio_ffmpeg_64.dll" to the directory but still nothing.