I used ISO timestamps for filenames.
Strangely, I can load those files ONLY if the filename is prefixed “./”.
Files containing “:” and not prefixed “./” are not successfully opened. Absolute paths also fail. Why? I assume it’s a bug.
openv 4.3.0 / ubuntu 18.
import cv2
for filename in [
"2022-01-20T00:55:51.541238+00:00.mp4", # isOpened=False
"./2022-01-20T00:55:51.541238+00:00.mp4", # isOpened=True
"2022.mp4", # True
"./2022.mp4", # True
"2022+00:00.mp4", # False
"./2022+00:00.mp4", # True
"2022:00.mp4", # False
"./2022:00.mp4", # True
"2022+00.mp4", # True
"./2022+00.mp4" # True
]:
cap = cv2.VideoCapture(filename)
print(f"Opened: [{cap.isOpened()}] {filename}")
---- Update:
Curiously, it doesn’t result from all uses of colons. Here’s the output with another set of filenames.
Opened: [False] 2022-01-20T00:55:51.541238+00:00.mp4
Opened: [True] ./2022-01-20T00:55:51.541238+00:00.mp4
Opened: [False] 2022:00.mp4
Opened: [True] 2022+00.mp4
Opened: [True] ./2022:00.mp4
Opened: [True] ./2022+00.mp4