#include #include #include #include #include using namespace cv; using namespace std; int main(int argc, char** argv) { int count=100; string str = argv[1]; string res=str.substr(10); VideoCapture capture(stoi(res)); capture.set(CAP_PROP_FRAME_WIDTH, 1920); capture.set(CAP_PROP_FRAME_HEIGHT, 1080); while (count) { Mat frame; capture >> frame; if (frame.empty()) { break; } int h = frame.rows; int w = frame.cols; const char *name = "video"; namedWindow(name, 0); imshow(name, frame); waitKey(30); count--; } return 0; }