PyAV can be installed via Anaconda, as follows:
conda install av -c conda-forge
Non-anaconda users will have to compile PyAV themselves, which is complicated, especially on Windows. For this we refer the users to the PyAV documentation.
There are two ways PIMS provides random access to video files, which is not something that video formats natively support:
PyAVReaderTimedbases the indices of the video frames on the
frame_ratethat is reported by the video file, along with the timestamps that are imprinted on the separate video frames. The readers
Videoare different names for this reader.
PyAVReaderIndexedscans through the entire video to build a table of contents. This means that opening the file can take some time, but once it is open, random access is fast. In the case timestamps or frame_rate` are not available, this reader is the preferred option.