opencv cv2 ffmpeg生成h264视频报错:Could not find encoder for codec_id=27, error: Encoder not found

[ERROR:[email protected]] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2927) open **Could not find encoder for codec_id=27, error: Encoder not found**
[ERROR:[email protected]] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (3002) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
[ERROR:[email protected]] global /io/opencv/modules/videoio/src/cap.cpp (595) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.6.0) /io/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /home/xxx/output.avi in function 'icvExtractPattern'

解决 :使用 imageio.v2
https://blog.csdn.net/weixin_43508499/article/details/125495758

你可能感兴趣的:(Linux,报错,#,CV-基础,标签)