This file contains hidden or 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
import cv2 | |
cap=cv2.VideoCapture("video.mp4") | |
fps = cap.get(cv2.CAP_PROP_FPS) | |
print(fps) |
This file contains hidden or 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
import os | |
for file in os.listdir(os.getcwd()): | |
if file.endswith('.txt'): | |
os.remove(file) |
This file contains hidden or 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
import os | |
import datetime | |
from time import sleep | |
for file in os.listdir(os.getcwd()): | |
if file.endswith('.jpg'): | |
os.rename(file, "img_"+datetime.datetime.now().strftime("%Y%m%d-%H%M%S%f")+'.jpg') | |
sleep(0.05) |
NewerOlder