Torchvision.io.read_video vs extracting images prior to creating dataset

I’d like to know which one is faster… torchvision.io.read_video vs extracting the images of the videos and then reading them.

For both the output video shape should be (channels, frames, height, width)

torchvision is quite fast.
Extracting images (on-the-fly) requires hardisk IO thus i doubt it were faster.
If you canextract images before hand that would be faster for sure as video is compressed and requires time to be decoded.