Currently PyAV 9.2.0 supports only till 3.10. The latest pyav 11 does support till python 12, however upon trying the latest package, I seem to notice a memory leak when looping the video, so we'll ...
I solved mine by installing scipy 1.7.2. For some reason when installing with python>=3.10 it installs scipy 1.6.7 which has some problems.