Had the same issue, had to install torchcodec=0.7 so that it was compatible with my pytorch version. then reset my runtime in colab and it worked. diagram of pytorch/torchcodec compatibilities found here https://github.com/meta-pytorch/torchcodec