Created
June 19, 2021 11:00
-
-
Save monogenea/d8eb6f7f290753df6d6543467dce6ec5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%% Load video capture and init VideoWriter | |
vid = cv2.VideoCapture('input/input.mp4') | |
vid_w, vid_h = int(vid.get(3)), int(vid.get(4)) | |
out = cv2.VideoWriter('output/output.mp4', cv2.VideoWriter_fourcc(*'mp4v'), | |
vid.get(cv2.CAP_PROP_FPS), (vid_w, vid_h)) | |
# Check if capture started successfully | |
assert vid.isOpened() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment