Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
import cv2
|
||||
|
||||
projectName = "Resolution checker.py"
|
||||
outputFile = "output.txt"
|
||||
|
||||
output = ""
|
||||
|
||||
for file in os.listdir():
|
||||
if file != projectName and file != outputFile:
|
||||
vid = cv2.VideoCapture(file)
|
||||
height = str(int(vid.get(cv2.CAP_PROP_FRAME_HEIGHT)))
|
||||
width = str(int(vid.get(cv2.CAP_PROP_FRAME_WIDTH)))
|
||||
output = output + (width + "x" + height + "\t" + file + "\n")
|
||||
|
||||
oFile = open(outputFile, "a")
|
||||
oFile.write(output)
|
||||
oFile.close()
|
||||
Reference in New Issue
Block a user