1. CV_CAP_PROP_FRAME_WIDTH 找不到
解決辦法:
Those constants have been changed in name and location in OpenCV for some time now.
For the capture properties, they no longer begin with CV_, so remove that prefix from all of them. You can find a list of all available capture properties here, note that they all simply start with CAP_PROP_.
The FOURCC code constructor is a method on the VideoWriter class now, so you should use VideoWriter::fourcc(…). The docs can be found here.