Could not find encoder for codec id 27: Encoder not found
Author: awilliamsonCreated Nov 2, 2018Updated Aug 1, 2023
When attempting to output a video from the system (an mp4), on initialisation it prints the !!! TYPE message followed by Could not find encoder for codec id 27: Encoder not found then proceeds as normal.
At the end of processing it will error with AttributeError: 'NoneType' object has no attribute '__array_interface__'.
I believe this is caused by opencv-python pip package not being shipped with x264 (open-source h264 encoder), due to GPL issues? (see skvark/opencv-python#81)
Suggestion is to potentially catch this issue before processing lengthy videos. I did a search of the issues here and didn't find anything related, so hopefully there's enough here that others may find the reason for their issue.
Source: qqwweee/keras-yolo3