cap.get(CV_CAP_PROP_FRAME_WIDTH) does not always return the value at cap.set(CV_CAP_PROP_FRAME_WIDTH, value)