Open
Description
🚀 The feature
Currently, read_video
method from torchvision.io accepts only a string as its first argument. I suggest making it work also with the Path
object from pathlib library.
Like this:
from pathlib import Path
root = Path("videos")
video = read_video(root/"video.mp4", pts_unit="sec")[0]
Currently, it raises ValueError: File object has no read() method, or readable() returned False.
Motivation, pitch
Working with paths as strings is not convenient, and instead, people are using Path
from pathlib.
Alternatives
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels