{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import cv2\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-08-10T14:47:52.639650Z","iopub.execute_input":"2022-08-10T14:47:52.640094Z","iopub.status.idle":"2022-08-10T14:47:52.881214Z","shell.execute_reply.started":"2022-08-10T14:47:52.640003Z","shell.execute_reply":"2022-08-10T14:47:52.880049Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"main_path = \"../input/dfl-bundesliga-data-shootout/train/\"\nfile_paths = os.listdir(main_path)","metadata":{"execution":{"iopub.status.busy":"2022-08-10T14:51:03.497119Z","iopub.execute_input":"2022-08-10T14:51:03.497525Z","iopub.status.idle":"2022-08-10T14:51:03.504772Z","shell.execute_reply.started":"2022-08-10T14:51:03.497488Z","shell.execute_reply":"2022-08-10T14:51:03.503660Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for file_path in file_paths:\n    vid = cv2.VideoCapture(os.path.join(main_path, file_path))\n    height = vid.get(cv2.CAP_PROP_FRAME_HEIGHT)\n    width = vid.get(cv2.CAP_PROP_FRAME_WIDTH)\n    print(f\"File path {file_path} has width {width} and height {height}\")","metadata":{"execution":{"iopub.status.busy":"2022-08-10T14:52:43.334363Z","iopub.execute_input":"2022-08-10T14:52:43.335559Z","iopub.status.idle":"2022-08-10T14:52:43.705210Z","shell.execute_reply.started":"2022-08-10T14:52:43.335512Z","shell.execute_reply":"2022-08-10T14:52:43.703646Z"},"trusted":true},"execution_count":null,"outputs":[]}]}