你好,我只是一个目录标题
linux 使用python-opencv, 保存avc1 也就是 lib64格式保存时,出现问题
[ERROR:0@0.191] global cap_ffmpeg_impl.hpp:2991 open Could not find encoder for codec_id=27, error: Enc oder not found
[ERROR:0@0.191] global cap_ffmpeg_impl.hpp:3066 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
这个是python不能访问系统lib64解码器问题?
解决方法
pip uninstall opencv-python opencv-contrib-python
conda install -c conda-forge opencv
ubantu, 保存成lib64出现
[ WARN:0@0.058] global /croot/opencv-suite_1676452025216/work/modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStream er: pipeline have not been created
解决方法, 好像是ubantu系统的问题,我也没看明白
设置一个环境变量
我这个是fish语法,
set -gx LD_PRELOAD /usr/lib/x86_64-linux-gnu/libstdc++.so.6
bash
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
使用cv2.VideoCapture(0),出现警告
[ WARN:0@0.008] global /croot/opencv-suite_1676452025216/work/modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStream er: pipeline have not been created
修改``cv2.VideoCapture(0) 为 cv2.VideoCapture(0, cv2.CAP_V4L2)